When the unbelievers in Makkah asked the Prophet Muhammad to show them a miracle, he showed them the splitting of the moon
Many miracles were performed by the Prophet Muhammad by God’s permission. These miracles were witnessed by many people. For example:
Narrated in Saheeh Al-Bukhari, #3637, and Saheeh Muslim, #2802
Another miracle was the flowing of water through Muhammad’s fingers when his companions got thirsty and had no water except a little in a vessel.They came to him and told him that they had no water to make ablution nor to drink except for what was in the vessel. So, Muhammad put his hand in the vessel, and the water started gushing out between his fingers. So, they drank and made ablution. They were one thousand five hundred companions.2
Narrated in Saheeh Al-Bukhari, #3576, and Saheeh Muslim, #1856
There were also many other miracles that were performed by him or which happened to him.