Muhammad is the most famous name for the Prophet (peace be upon him), besides the name Ahmad. Before the Prophet was born, many Arabs named their son Muhammad, when they learned from the shamans (at that time) and Jewish priests about the news of the last Prophet from the Arabs named Muhammad.
Because of the news, those who have a baby boy will name him after him, in the hope that his son will be the last prophet and apostle sent. But none of them were the last prophets.
The Jews of that time still adhered to the original Torah. So information about the signs and characteristics of the last prophet is clearly mentioned in it, including regarding his name.
The scholars disagreed over who the Arabs of the jahiliyyah period were named “Muhammad”.
In the book of Ar-Raudh al-Unf (2/96), Imam As-Suhaili said that there were 3 children who were named “Muhammad” before the birth of the Prophet (peace be upon him), as Ibn Faurak said.
1) Muhammad bin Sufyan bin Mujasyi’, great-grandfather of the poet Al-Farazdaq.
2) Mohammad bin Uhaihah bin Al-Julah bin Al-Harisy bin Jumahi bin Kulfah bin ‘Auf bin ‘Amr bin ‘Auf bin Malik bin al-Aus.
3) Mohammad bin Humran bin Rabi’ah.
Meanwhile, in the book of Asy-Shifa bi Ta’rif Huquq al-Mushthafa, al-Qadhi ‘Iyadh argues that before the Prophet was born, there were 6 sons born and named Muhammad.
1) Mohammad bin Uhaihah bin Al-Julah al-Ausi
2) Mohammad bin Maslamah Al-Anshari
3) Mohammad bin Bara’ Al-Bakri,
4) Mohammad bin Humran Al-Ju’fi
5) Mohammad bin Khuza’i As-Sulami.
6) Mohammad bin Sufyan bin Mujasyi’