In the beginning of Islam, when Rasulullah (sallallahu ‘alaihi wasallam) began inviting people to Islam individually, the Quraish did not interfere with him nor oppose him. However, when he began to invite to Islam openly, began to speak ill of idol worship and began to prevent people from engaging in kufr and shirk, the Quraish began to show him enmity and oppose him. However, his uncle, Abu Taalib, defended him and continued to support and assist him.
One day, Rasulullah (sallallahu ‘alaihi wasallam) entered Musjid-ul-Haraam and saw the disbelievers prostrating before their idols. Seeing this, he addressed them saying, “O people of the Quraish! You have opposed the creed of your forefather, Nabi Ebrahim ([‘alaihis salaam] i.e. the creed of tauheed)!”
Hearing these words, the Quraish were angered with Rasulullah (sallallahu ‘alaihi wasallam) speaking out against their idols and hence they decided to put a stop to his message. For this purpose, they sent a delegation to Abu Taalib.
The delegation came to Abu Taalib and addressed him saying, “Your nephew speaks ill of our idols, criticizes our religion, tells us that we are following a path of foolishness by worshipping idols, and says that our forefathers who worshipped idols were astray. You should either prevent him from doing this or stop intervening between us so that we can sort out the matter with him.”
Abu Taalib gently and tactfully brushed off the issue, and thus Rasulullah (sallallahu ‘alaihi wasallam) continued inviting towards the oneness of Allah Ta‘ala and speaking against kufr and shirk.
When more people began to enter into the fold of Islam, and the message of Rasulullah (sallallahu ‘alaihi wasallam) began to spread among the people, the disbelievers were infuriated and thus they began to persecute the Muslims. (Seeratul Halabiyyah 1/286, Sharhuz Zurqaani 1/462, Rowdhul Unf 2/4-5)
However, despite their opposition and persecution, Rasulullah (sallallahu ‘alaihi wasallam) was undeterred and continued to invite towards the oneness of Allah Ta‘ala and condemn idol worship. Even though Abu Taalib did not embrace Islam, he still supported Rasulullah (sallallahu ‘alaihi wasallam), and through his position and influence, continued to defend and protect Rasulullah (sallallahu ‘alaihi wasallam) from their persecution and oppression.
When this continued for some time, the Quraish decided to send a delegation of leaders to Abu Taalib for the second time to persuade him to stop protecting Rasulullah (sallallahu ‘alaihi wasallam). Among this delegation were Utbah and Shaybah who were the two sons of Rabee’ah, Abu Sufyaan (who had not yet embraced Islam), Abul Bakhtari, Aswad bin Muttalib, Abu Jahl, Waleed bin Mugheerah, Nubaih and Munabbih who were the two sons of Hajjaaj bin Aamir, and Aas bin Waa’il.
When this delegation came to Abu Taalib, they addressed him saying, “We accept and acknowledge your nobility and high status among us, but we will never tolerate our idols being criticized and our forefathers being referred to as fools. Either you stop your nephew from what he is doing, or else we will wage war against him until one of us will perish.” Saying this, they departed.
Abu Taalib was greatly affected by the opposition and enmity of his family and people. When Rasulullah (sallallahu ‘alaihi wasallam) came to him, Abu Taalib said, “My beloved nephew! The people of your tribe came to me and this is what they had to say about you.”
Abu Taalib then informed him of what had transpired between him and the delegation of the Quraish. Abu Taalib thereafter said to Rasulullah (sallallahu ‘alaihi wasallam), “I thus urge you to take pity on me and take pity on yourself as well, and do not make me carry a burden that I cannot bear.”
From this conversation, Rasulullah (sallallahu ‘alaihi wasallam) felt that perhaps Abu Taalib did not wish to continue protecting him and supporting him. So, with tearful eyes and a sorrowful heart, Rasulullah (sallallahu ‘alaihi wasallam) said to Abu Taalib, “O my Uncle! By Allah! Even if these people place the sun in my right hand and the moon in my left hand and urge me to cease this mission, I will never do so until Allah Ta‘ala either grants this deen dominance in the world or I die in the process.”
Saying this, Rasulullah (sallallahu ‘alaihi wasallam) began to weep and stood up to leave. Abu Taalib called for him and said, “My beloved nephew! You may continue with your mission and do as you please. I will never surrender you to your enemies.”
Some Ulama explain that the sun and the moon are the two greatest sources of physical light in the world. Thus, by Rasulullah (sallallahu ‘alaihi wasallam) mentioning the sun and moon, he was indicating that even if the disbelievers give him the two greatest sources of light in this world, he will not leave his mission as this light of the sun and moon cannot compare to the light of imaan and Islam which Allah Ta‘ala has given him, and hence he will give preference to his mission of propagating tauheed and Islam over everything else in the world. (Rowdh-ul-Unf 2/7)
Other Ulama say that the sun and moon are symbolic of undergoing the most severe types of hardships and difficulties. Hence, when Rasulullah (sallallahu ‘alaihi wasallam) said, “Even if they place the sun in my right hand and the moon in my left hand, I will not leave this mission”, he meant “Even if they put me through the worst of trials and tribulations, I will not give up my mission which Allah Ta‘ala has assigned me with”.