Praise be to Allah.
The command to uphold the ties of kinship is one of the first commands that were revealed in Islam. It is indicated in a number of proven saheeh ahaadeeth, such as the following:
The story of how ‘Umar ibn ‘Absah became Muslim. He asked the Prophet (peace and blessings of Allaah be upon him): With what were you sent? He (peace and blessings of Allaah be upon him) said: “He has sent me to uphold the ties of kinship, to break the idols and to proclaim the Oneness of Allaah, not associating anything with Him.” Narrated by Muslim (832).
The story of Abu Sufyaan and Heraclius when he sent for him and said: What does he – meaning the Prophet (peace and blessings of Allaah be upon him) – enjoin upon you? He said: He enjoins us to pray, give charity, be chaste and uphold family ties.” Narrated by al-Bukhaari (7) and Muslim (1773).
In many verses Allaah warns us against severing the ties of kinship, and states that there will be numerous punishments for the one who does so, which includes incurring the curse of Allaah and a bad end. Allaah says (interpretation of the meaning):
“And those who break the Covenant of Allaah, after its ratification, and sever that which Allaah has commanded to be joined (i.e. they sever the bond of kinship and are not good to their relatives), and work mischief in the land, on them is the curse (i.e. they will be far away from Allaah’s Mercy), and for them is the unhappy (evil) home (i.e. Hell)”
Some relatives may cause the one who upholds ties with them to fall into sin, especially if he is unable to change the evil that they are doing. They may insist – for example – on listening to music and mixing and indulging in swearing, mocking and backbiting. Such people have an effect on their visitors and the one who seeks to uphold ties with them. The Muslim has to advise his relatives as much as he is able to. They are more entitled to this advice than others, but only if that will benefit them, whether he is certain of that or thinks it most likely. But if he sees that they are persisting in sin and especially major sins, and that is affecting his faith and religious commitment, then it is sufficient for him to uphold ties with them in the minimum fashion, so that he will not be severing the ties of kinship. So instead of visiting them, he can just call them on the phone, and if he visits them he does not have to stay for long, and so on.
But this should after trying his best to advise them and exhort them and bring them back to the right way, as well as turning to Allaah in du’aa’, asking Him to guide them to the straight path.
And Allaah knows best.