Allah referes to the prophet, as the unlettered prophet, which means illiterate, or poorly educated.
Those who follow the Messenger, the unlettered prophet, whom they find written in what they have of the Torah and the Gospel, who enjoins upon them what is right and forbids them what is wrong and makes lawful for them the good things and prohibits for them the evil and relieves them of their burden and the shackles which were upon them. So they who have believed in him, honored him, supported him and followed the light which was sent down with him - it is those who will be the successful.
Say, [O Muhammad], "O mankind, indeed I am the Messenger of Allah to you all, [from Him] to whom belongs the dominion of the heavens and the earth. There is no deity except Him; He gives life and causes death." So believe in Allah and His Messenger, the unlettered prophet, who believes in Allah and His words, and follow him that you may be guided.7:157-158
nothing else can contradict the quran of course, if Allah has given him the title of the "unlettered prophet" then indeed he is illiterate, in which we cannot deny.