It is not permissible to forsake a Muslim, because the Prophet (peace and blessings of Allaah be upon him) said: “It is not permissible for a man to forsake his Muslim brother for more than three days, each of them turning away from the other when they meet. The better of them is the one who gives the greeting of salaam first.” (Narrated by al-Bukhari, 5727; Muslim, 2560). This applies especially if the believer is a relative, such as a brother, nephew, uncle or cousin because in such cases forsaking is an even worse sin.
This applies unless a person is indulged in a sin and there is some interest to be served in favor of that person and Islam by forsaking him i.e. making him give up on his sin. In that case, there is nothing wrong with it, because this comes under the heading of removing evil. The Prophet (peace and blessings of Allaah be upon him) said: “Whoever among you sees an evil action, let him change it with his hand [by taking action]; if he cannot, then with his tongue [by speaking out]; if he cannot then with his heart [by hating it and feeling that it is wrong], and that is the weakest of faith.”
(Narrated by Muslim, 49).
The basic principle is that it is haraam for a Muslim to forsake his fellow-Muslim unless there is a reason to allow it.
The prohibition in forsaking a person is in the case forsaking because of anger with regard to something that has nothing to do with impermissible acts in islam. With regard to forsaking someone for a religious reason, such as his committing sin or bid’ah, there is no prohibition on that. The Prophet (peace and blessings of Allaah be upon him) commanded (his companions) to forsake Ka’b ibn Maalik, Hilaal ibn Umayyah and Maraarah ibn al-Rabee’ (may Allaah be pleased with them). Ibn ‘Abd al-Barr said: This hadeeth of Ka’b indicates that it is permissible for a man to forsake his brother if he commits some act of bid’ah or immorality, in the hope that forsaking him may discipline him and serve as a rebuke to him.
Regarding to forsake a person because of sin or bidah it should be continued until he repents from that and does not go back to it.
All the scholars agree that it is not permissible for a Muslim to forsake his brother for more than 3 days unless there is a fear that speaking to him may pose danger to his religious commitment and have some harmful effect on one's spirituality and otherworldly interests. If that is the case, it is permissible to avoid him, because peaceful avoidance is better than harmful mixing.
If your brother has done something haraam then you must first advise him and explain that this thing is haram and is not permitted and also remind him of Allah. If he persists in sining and by forsaking him he may leave that sin than you must do so as is permissible in this case. But care must be taken in things where the person in question just doesn't agree to your opinions or simply done something that you do not agree with then forsaking that person is not an option. Rather forsaking him will lead him to reject your view completely, let alone the fact that this is not a legitimate shar’i justification for forsaking him for more than three days. We have seen above in the fatwa of Shaykh Ibn ‘Uthaymeen that the basic principle is that it is haraam for a Muslim to forsake his fellow-Muslim, unless there is a reason to allow it.
The Muslim must be forbearing and sincere towards his brothers, he must be tolerant towards them and overlook their mistakes. He should not hasten to adopt a solution that may cause division and haraam kinds of forsaking. May Allaah help us all to do that which He loves and which pleases Him. May Allaah send blessings upon our Prophet Muhammad.