Apparently Muhammad was not the first to preach monotheism in Arabia at the time and the time before his mission. There are traditions which hold that he had contact with such monotheists in early age.
While Muhammad was born into a powerful tribe, the Quraysh, which ruled Mecca and its sacred site the Kaaba when it was still a Pagan or at least a Henotheistic site, he was influenced by existing monotheistic groups and individuals: Jews, Christians, and local monotheists who were inspired by the Abrahamic faiths.
Little by little Muhammad took the Arabic pantheon and religion and removed the deities of the pantheon, making Allah the sole deity. More than a religious theology, it was a crucial political and strategic goal that was part of breaking the monopoly of the Quraysh over the Kaaba.