The Quraysh, increasingly frustrated by the growing influence of the Prophet Muhammad (PBUH) and his message, decided to implement a severe strategy to isolate him and his supporters. This strategy took the form of a social and economic boycott directed against Banu Hashim, the Prophet's clan. The objective was to force them to surrender the Prophet to the Quraysh, thereby stopping the spread of Islam. The boycott prohibited the Quraysh and their allies from engaging in trade or marriage with the Banu Hashim, effectively cutting them off from the economic and social life of Makkah.

As the boycott took effect, the Banu Hashim, along with the Prophet, sought refuge in a narrow valley on the outskirts of Makkah. The valley, known as Shi'b Abi Talib, became their home for the duration of the boycott. Life in the valley was harsh; the lack of trade meant that food and essential supplies were scarce, leading to severe hunger and hardship. Despite these conditions, the Banu Hashim remained steadfast in their support of the Prophet, refusing to succumb to the pressure exerted by the Quraysh.

The boycott persisted for approximately three years, a duration traditionally accepted though not documented with certainty. It eventually came to an end when some members of the Quraysh, moved by the plight of the besieged, managed to have the boycott annulled. The narrative of the boycott's conclusion involves the miraculous deterioration of the written pact in the Kaaba, which some accounts say was eaten by insects, leaving only the words 'In the name of Allah'. This event marked the end of a particularly trying period in the early Muslim community's history.