Note:The following article is an exercise in pure speculation.My knowledge about both Marxism and Islam is optimistically speaking,limited.I hope the readers forgive me for my incompetence.
A few days ago,I chanced upon a biography of Muhammed by Maxime Rodinson.It was a scholarly work and quite a refreshing change from the diatribes or the adoration that he seems to generate on the internet(and I tend to find both a little repugnant).As I was reading about his life, it dawned upon me that initially,his movement stemmed from socio economic causes(rather than divine ones) and the class struggle that engulfed Arab/Meccan society at that time.
Now what I understand of the pre Islamic Meccan society is that it was a tribalistic society and each tribe had it's own God whom it would appease. Thus, to Muhammed,these idols of these Meccan/Arabic gods probably became symbols of the struggle between these tribes,which is a rudimentary example of the modern day class struggle[between the haves and the have nots].The difference lies in the fact that while Muhammed replaced all these Gods by one God in order to unify society,Marx did away with the whole 'God' business altogether.
Also the concepts of 'Ummah' and the lack of statehood in Islam has striking similarities to the concept of 'Pure Communism',which envisions a stateless,classless society(much like Islam).The 'Proletriat' or the democracy of the masses is a lot similar to Ummah.Now coming back to the 'God' concept,this is probably where Marx and Muhammed diverge.Marx's theories,being purely intellectual conceptions were and as a matter of fact,still are open to scrutiny.However,Muhammed's theories covered a whole spectrum,from being purely political to out rightly religious.Thus it added a religious and divine dimension to his theories which made them impervious to scrutiny.
To sum up,we could say that the only difference between Marx and Muhammed was that the latter believed in one God more