How did prophet muhammad make a living?
“O Allah! Make the blessings of the people of Muhammad in the extent of their need…”
Muslim, Zakat, 126
When the Messenger of Allah (pbuh) was in Mecca, he had special means to earn his livelihood; while in Medina fay’ and war booty became the source of his income.
However, these sources of income did not always happen to exist in the hands of the Prophet (pbuh) at the same time. In addition, when we consider the guests that the Prophet (pbuh) catered to and the needy members of the early Muslim society which he helped, we can see that he did not easily benefit from these sources; rather he preferred to live an ascetic life. In fact this state can be observed in his eating and drinking, his clothes, his simple house life, and in his worldly inheritances.
 Fay’: is the revenues acquired peacefully from non-Muslims without having a battle. (al-Hashr 59; 6-7) These revenues are spent for the services of the state, such as salaries of government employees and soldiers, expenditures of defense, and other public works.
Ganimah or war booty: is the property and slaves taken from an enemy in time of war. According to the chapter al-Anfal, four -fifth of these are distributed among the veterans. The rest one -fifth of the shares is assigned to Allah, to the Messenger, to near relatives, orphans, the needy, and the wayfarer. (al-Anfal 8; 41)
Source: An Excellent Exemplar, Osman Nuri Topbaş, Erkam Publications