Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:23

O you who have believed, do not take your fathers or your brothers as allies if they have preferred disbelief over belief. And whoever does so among you - then it is those who are the wrongdoers.  

The following was revealed regarding those who refrained from emigrating because of their families and trade: O you who believe, do not take your fathers and brothers for your friends, if they prefer, if they have chosen, disbelief over belief; whoever of you takes them for friends, such are the evildoers.
القرآن:٩:٢٣

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَتَّخِذُوا آبَاءَكُمْ وَإِخْوَانَكُمْ أَوْلِيَاءَ إِنِ اسْتَحَبُّوا الْكُفْرَ عَلَى الْإِيمَانِ ۚ وَمَنْ يَتَوَلَّهُمْ مِنْكُمْ فَأُولَٰئِكَ هُمُ الظَّالِمُونَ  

ونزل فيمن ترك الهجرة لأجل أهله وتجارته: {يا أيها الذين آمنوا لا تتخذوا آباءكم وإخوانكم أولياء إن استحبوا} اختاروا {الكفر على الإيمان ومن يتولهم منكم فأولئك هم الظالمون}.