When the disbelievers were not successful in confronting and stopping the call, they decided to ask the Prophet (peace be upon him) for an amazing feat—as they thought. Consequently, they asked him to split the moon into two halves.
They thought that they would be asking him to do something beyond his ability and as a result stop his call. But what they asked for happened, as the moon split into two halves and one could see Abu Qubais mountain between them. It was a manifest miracle from Allah (Glorified is He) and a clear sign of His greatness, an argument against the polytheists and a proof for the Prophet (peace be upon him). Ibn Masoud (may Allah be pleased with him) said, «The moon split into two parts during the life of the Prophet (peace be upon him), one part above the mountain and another part below it. Therefore the Prophet said, ‘Bear witness to this’» [related by Al-Bukhari].
The Quran revealed ayahs that recorded this miracle for it to be recorded in this great Book until the Resurrection Day. They are in a Surah called after the moon, i.e. Surah Al-Qamar. Allah says, {The Hour [of judgement] is nigh, and the moon was split. But if they see a sign, they turn away and say, ‘This is no end to this magic’} [Surah Al-Qamar: 1-2].
When the moon split, the disbelievers of Quraysh said, "The son of Abu Kabsha (referring to the Prophet’s father through breastfeeding, the husband of Helima who breastfed the Prophet) has bewitched you."
One of them said, "If Muhammed can do magic that affects the moon here, he will not be able to do magic that can be seen throughout all the earth. Therefore, ask those who arrive from other lands if they saw the moon split." Consequently, Quraysh asked them, and they told Quraysh that they saw the moon split into two [The Springs of Traditions].