Muhammad Ali was born in Kavala, in Macedonia, Rumeli Eyalet of the Ottoman Empire, today a city in Greece, to an Albanian family from Korça. He was the second son of Albanian tobacco and shipping merchant named Ibrahim Agha, who also served as an Ottoman commander of a small unit in Kavala.

His mother was Zeynep, the daughter of the "Ayan of Kavala" Çorbaci Husain Agha. When his father died at a young age, Muhammad was taken and raised by his uncle with his cousins. As a reward for Muhammad Ali's hard work, his uncle gave him the rank of "Bolukbashi" for the collection of taxes in the town of Kavala.

Muhammad Ali later married his cousin Amina Hanim, a wealthy widow. She was the daughter of Ali Agha and Kadriye (Zeynep's sister).

In 1801, his unit was sent, as part of a much larger Ottoman force, to re-occupy Egypt following a brief French occupation that threatened the way of life in Egypt. The expedition consisting of Xebec landed at Aboukir in the spring of 1801. One of his trusted army commanders was Miralay Mustafa Bey, who had married Muhammad's sister Zubayda and was the ancestor of the Yakan family.

As the conflict drew on, the local populace grew weary of the power struggle. In 1801, he allied with the Egyptian leader Umar Makram and Egypt's Grand Imam of al-Azhar. During the infighting between the Ottomans and Mamluks between 1801 and 1805, Muhammad Ali carefully acted to gain the support of the general public.

In 1805, a group of prominent Egyptians led by the ulema (scholars, savants) demanded the replacement of Wāli (viceroy) Khurshid Ahmad Pasha by Muhammad Ali, and the Ottomans yielded.

Muhammad Ali's first military campaign was an expedition into the Arabian Peninsula. The holy cities of Mecca and Medina had been captured by the House of Saud, who had recently embraced a literalist Hanbali interpretation of Islam. Armed with their newfound religious zeal, the Saudis began conquering parts of Arabia. This culminated in the capture of the Hejaz region by 1805.

Sultan Selim III (reigned 1789–1807) had recognized the need to reform and modernize the Ottoman military, along European lines, to ensure that his state could compete. Selim III, however, faced stiff local opposition from an entrenched clergy and military apparatus, especially from the Janissaries. Consequently, Selim III was deposed and ultimately killed in 1808.

In 1809, though, Ali exiled Makram to Damietta. According to Abd al-Rahman al-Jabarti, Makram had discovered Muhammad Ali's intentions to seize power for himself.

His first task was to secure a revenue stream for Egypt. To accomplish this, Muhammad Ali 'nationalized' all the iltizam lands of Egypt, thereby officially owning all the production of the land. He accomplished the state annexation of property by raising taxes on the 'tax-farmers who had previously owned the land throughout Egypt. The new taxes were intentionally high and when the tax-farmers could not extract the demanded payments from the peasants who worked the land, Muhammad Ali confiscated their properties.

Muhammad Ali invited the Mamluk leaders to a celebration at the Cairo Citadel in honor of his son, Tusun Pasha, who was to lead a military expedition into Arabia. The event was held on 1 March 1811. When the Mamluks had gathered at the Citadel and were surrounded and killed by Muhammad Ali's troops.

While the campaign was successful, the power of the Saudis was not broken. They continued to harass Ottoman and Egyptian forces from the central Nejd region of the Peninsula. Consequently, Muhammad Ali dispatched another of his sons, Ibrahim, at the head of another army to finally rout the Saudis. Then, the Saudis were crushed and most of the Saudi family was captured. The family leader, Abdullah ibn Saud, was sent to Istanbul and executed.

In 1819/21, his government founded the first indigenous press in the Arab World, the Bulaq Press. The Bulaq Press published the official gazette of Muhammad Ali's government.

In 1820 Muhammad Ali dispatched an army of 5,000 troops commanded by his third son, Ismail and Abidin Bey, south into Sudan with the intent of conquering the territory and subjugating it to his authority.

While Muhammad Ali was expanding his authority into Africa, the Ottoman Empire was being challenged by ethnic rebellions in its European territories. The rebellion in the Greek provinces of the Ottoman Empire began in 1821. The Ottoman army proved ineffectual in its attempts to put down the revolt as ethnic violence spread as far as Constantinople. With his own army proving ineffective, Sultan Mahmud II offered Muhammad Ali the island of Crete in exchange for his support in putting down the revolt.

Ali's troops made headway into Sudan in 1821 but were met with fierce resistance by the Shaigiya. Ultimately, the superiority of the Egyptian troops and firearms ensured the defeat of the Shaigiya and the subsequent conquest of Sudan.

In the 1820s, Muhammad Ali sent the first educational "mission" of Egyptian students to Europe. This contact resulted in the literature that is considered the dawn of the Arabic literary renaissance, known as the Nahda.

Clot-Bey had been invited in 1827 by Muhammad Ali to found the Qasral-‘Ayni School of Medicine at the Army hospital of Abou Zabel which later transferred to Cairo.

Muhammad Ali sent 16,000 soldiers, and 63 escort vessels under command of his son, Ibrahim Pasha. Britain, France, and Russia intervened to protect the Greek revolutionaries. On 20 October 1827 at the Battle of Navarino, while under the command of Muharram Bey, the Ottoman representative, the entire Egyptian navy was sunk by the European Allied fleet, under the command of Admiral Edward Codrington.

In compensation for his loss at Navarino, Muhammad Ali asked the Porte for the territory of Syria. The Ottomans were indifferent to the request; the Sultan himself asked blandly what would happen if Syria was given over and Muhammad Ali later deposed. But Muhammad Ali was no longer willing to tolerate Ottoman indifference. To compensate for his and Egypt's losses, the wheels for the conquest of Syria were set in motion.

The purpose of the law was to represent Muhammad Ali in his absence. Muhammad Ali started his renovations in law by moving towards a more effective control over crime within Egypt. Most notably he did this by passing his first penal legislation in 1829, in an effort to get a stronger hold over the population.

By this time, Muhammad Ali was already moving towards an establishment of an independent state, which he first expressed in 1830, by creating a state of "law and order", where Christians within Egypt can be safe, which was a way Muhammad Ali was able to pull influence from Europe. He started gradually renovating more of the government for him to hold more sway over it rather than the sultan. He implemented a police force, mostly well known within Cairo and Alexandria, that functioned not just as a form of authority over the law, but also as a form of a public prosecutor's office.

Consequently, he focused on weapons production. Factories based in Cairo produced muskets and cannons. With a shipyard he built in Alexandria, he began construction of a navy. By the end of the 1830s, Egypt's war industries had constructed nine 100-gun warships and were turning out 1,600 muskets a month.

A new fleet was built, a new army was raised and on 31 October 1831, under Ibrahim Pasha, the Egyptian invasion of Syria initiated the First Turko-Egyptian War. For the sake of appearance on the world stage, a pretext for the invasion was vital.

The Egyptians overran most of Syria and its hinterland with ease. The strongest and only really significant resistance was put up at the port city of Acre. The Egyptian force eventually captured the city after a six-month siege, which lasted from 3 November 1831 to 27 May 1832. Unrest on the Egyptian home front increased dramatically during the course of the siege. Ali was forced to squeeze Egypt more and more in order to support his campaign and his people resented the increased burden.

In 1832, Muhammad Ali allowed Antoine Clot, known as "Clot Bey" in Egypt, to establish a School of Medicine for women.

After the fall of Acre, the Egyptian army marched north into Anatolia. At the Battle of Konya (21 December 1832), Ibrahim Pasha soundly defeated the Ottoman army led by the sadr azam Grand Vizier Reshid Pasha. There were now no military obstacles between Ibrahim's forces and Constantinople itself.

Russia's gain dismayed the British and French governments, resulting in their direct intervention. From this position, the European powers brokered a negotiated solution in May 1833 known as the Convention of Kutahya. The terms of the peace were that Ali would withdraw his forces from Anatolia and receive the territories of Crete (then known as Candia) and the Hijaz as compensation, and Ibrahim Pasha would be appointed Wāli of Syria. The peace agreement fell short, however, of granting Muhammad Ali an independent kingdom for himself, leaving him wanting.

Despite this show, Muhammad Ali's goal was now to remove the current Ottoman Sultan Mahmud II and replace him with the sultan's son, the infant Abdülmecid. This possibility so alarmed Mahmud II that he accepted Russia's offer of military aid resulting in the Treaty of Hünkâr İskelesi.

On 25 May 1838, Muhammad Ali informed Britain, and France that he intended to declare independence from the Ottoman Empire. This action was contrary to the desire of the European powers to maintain the status quo within the Ottoman Empire. With Muhammad Ali's intentions clear, the European powers, particularly Russia, attempted to moderate the situation and prevent conflict. Within the Empire, however, both sides were gearing for war. Ibrahim already had a sizable force in Syria. ' In Constantinople, the Ottoman commander, Hafiz Pasha, assured the Sultan that he could defeat the Egyptian army.

When Mahmud II ordered his forces to advance on the Syrian frontier, Ibrahim attacked and destroyed them at the Battle of Nezib (24 June 1839) near Urfa. In an echo of the Battle of Konya, Constantinople was again left vulnerable to Ali's forces. A further blow to the Ottomans was the defection of their fleet to Muhammad Ali. Mahmud II died almost immediately after the battle took place and was succeeded by sixteen-year-old Abdülmecid. At this point, Ali and Ibrahim began to argue about which course to follow; Ibrahim favored conquering the Ottoman capital and demanding the imperial seat while Muhammad Ali was inclined simply to demand numerous concessions of territory and political autonomy for himself and his family.

At this point, the European powers again intervened. On 15 July 1840, the British government, which had negotiated with Austria, Prussia, and Russia to sign the Convention of London, offered Muhammad Ali hereditary rule of Egypt as part of the Ottoman Empire if he withdrew from the Syrian hinterland and the coastal regions of Mount Lebanon. Muhammad Ali hesitated, believing he had support from France. His hesitation proved costly. France eventually backed down as King Louis-Philippe did not want his country to find itself involved and isolated in a war against the other powers, especially at a time when he also had to deal with the Rhine crisis. British naval forces were ordered to sail to Syria and Alexandria. In the face of such displays of European military might, Muhammad Ali acquiesced. Muhammad Ali finally had to accept the convention on 27 November 1840.

After 1843, fast on the heels of the Syrian debacle, and the treaty of Balta Liman, which forced the Egyptian government to tear down its import barriers, and to give up its monopolies, Muhammad Ali's mind became increasingly clouded and tended towards paranoia. Whether it was genuine senility or the effects of the silver nitrate he had been given years before to treat an attack of dysentery remains a subject of debate.

Ibrahim, progressively crippled by rheumatic pains and tuberculosis (he was beginning to cough up blood), was sent to Italy to take the waters, Muhammad Ali, in 1846, traveled to Constantinople. There he approached the Sultan, expressed his fears, and made his peace, explaining: "[My son] Ibrahim is old and sick, [my grandson] Abbas is indolent, and then children will rule Egypt. How will they keep Egypt?" After he secured hereditary rule for his family, the Wali ruled until 1848, when senility made further governance by him impossible.

By this time Muhammad Ali had become so ill and senile that he was not informed of his son's death. Lingering a few months more, Muhammad Ali died at Ras el-Tin Palace in Alexandria on 2 August 1849 and ultimately was buried in the imposing mosque he had commissioned in the Cairo Citadel.