(O ye who believe! Choose not your fathers nor your brethren for friends if they take pleasure in disbelief rather than faith) [9:23-24]. Said al-Kalbi: “When the Messenger of Allah, Allah bless him and give him peace, was commanded to migrate to Medina, some men went to their fathers, brothers or wives and said: 'We have been commanded to migrate to Medina'. Thus, some people liked the command and hastened to execute it, while the wives, dependents and children of others hung on to some others, saying: 'We beseech you by Allah not to leave us to no one, causing our waste and peril'. The hearts of these softened for them and, as a result, they refrained from migrating. These words of Allah, exalted is He, were then revealed to rebuke them (O ye who believe! Choose not your fathers nor your brethren for friends if they take pleasure in disbelief rather than faith…)”. As for those who stayed back in Mecca and did not migrate, Allah, exalted is He, revealed (then wait till Allah bringeth His command to pass…) [9:24], meaning fighting and the conquest of Mecca.
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou