There are many stories surrounding the circumstances of the attempted murder on him. A version by the 19th century Ottoman historian Cevdet Pasha gives following account: one of his slaves, a Georgian girl named Cevri, gathered ashes when she heard the commotion in the palace of the murder of Selim III. When the assassins approached the Harem chambers where Mahmud was staying, she was able to keep them away for a while by throwing ashes into their faces, temporary blinding them. This allowed Mahmud to escape through a window and climb onto the roof of the Harem. He apparently ran to the roof of the Third Court where other pages saw him and helped him come down with pieces of clothes that were quickly tied together as a ladder. By this time one of the leaders of the rebellion, Alemdar Pasha arrived with his armed men and upon seeing the dead body of Selim III proclaimed Mahmud as padishah. The slave girl Cevri Kalfa was awarded for her bravery and loyalty and appointed haznedar usta, the chief treasurer of the imperial Harem, which was the second most important position in the hierarchy. A plain stone staircase at the Altınyol (Golden Way) of the Harem is called Staircase of Cevri (Jevri) Kalfa, since the events apparently happened around there and are associated with her.
The vizier took the initiative in resuming reforms that had been terminated by the conservative coup of 1807 that had brought Mustafa IV to power. However, soon the vizier was killed by Ibrahim's army, and Mahmud II temporarily abandoned the reforms. Mahmud II's later reformation efforts were more successful.
His reign also marked the first breakaway from the Ottoman Empire, with Greece gaining its independence following a rebellion that started in 1821. In 1827 the combined British, French and Russian navies defeated the Ottoman Navy at the Battle of Navarino; in the aftermath, the Ottoman Empire was forced to recognize Greece with the Treaty of Constantinople in July 1832. This event, together with the occupation of the Ottoman province of Algeria by France in 1830, marked the beginning of the gradual break-up of the Ottoman Empire. Non-Turkish ethnic groups living in the empire's territories, especially in Europe, started their own independence movements.
Among Mahmud II's most notable achievements, the Janissary corps was abolished in 1826, permitting the establishment of a modern Ottoman Army; Mahmud was also responsible for the subjugation of the Iraqi Mamluks in 1831 and the preparation of the Tanzimat reforms in 1839. The Tanzimat marked the beginning of modernization in Turkey, and had immediate effects on social and legal aspects of life in the Empire, such as European style clothing, architecture, legislation, institutional organization and land reform.
Previous to the first of the Firmans the property of all persons banished or condemned to death was forfeited to the crown; and a sordid motive for acts of cruelty was thus kept in perpetual operation, besides the encouragement of a host of vile Delators.
The second firman removed the ancient rights of Turkish governors to doom men to instant death by their will; the Paşas, the Ağas, and other officers, were enjoined that "they should not presume to inflict, themselves, the punishment of death on any man, whether Raya or Turk, unless authorized by a legal sentence pronounced by the Kadi, and regularly signed by the judge." Mahmud also created an appeal system by a criminal to one of the Kazaskers of Asia or Europe, and finally to the Sultan himself, if the criminal chose to persist in his appeal.
About the same time that Mahmud II ordained these changes, he personally set an example of reform by regularly attending the Divan, or state council, instead of secluding himself from the labors of state. The practice of the Sultan avoiding the Divan had been introduced as long ago as the reign of Suleiman I, and was considered as one of the causes of the decline of the Empire by a Turkish historian nearly two centuries before Mahmud II's time.
Mahmud II also addressed some of the worst abuses connected with the Vakifs, by placing their revenues under state administration. However, he did not venture to apply this vast mass of property to the general purposes of the government.
In his time the financial situation of the Empire was troubling, and certain social classes had long been under oppression under difficult taxes. In dealing with the complicated questions that therefore arose, Mahmud II is considered to have demonstrated the best spirit of the best of the Köprülüs. A Firman of February 22 1834 abolished the vexatious charges which public functionaries, when traversing the provinces, had long been accustomed to take from the inhabitants. By the same edict all collection of money, except for the two regular half-yearly periods, was denounced as abuses. "No one is ignorant," said Sultan Mahmud II in this document, "that I am bound to afford support to all my subjects against vexatious proceedings; to endeavour unceasingly to lighten, instead of increasing their burdens, and to ensure peace and tranquility. Therefore, those acts of oppression are at once contrary to the will of God, and to my imperial orders."
The haraç, or capitation-tax, though moderate and exempting those who paid it from military service, had long been made an engine of gross tyranny through the insolence and misconduct of the government collectors. The Firman of 1834 abolished the old mode of levying it, and ordained that it should be raised by a commission composed of the Kadı, the Muslim governors, and the Ayans, or municipal chiefs of Rayas in each district. Many other financial improvements were effected. By another important series of measures, the administrative government was simplified and strengthened, and a large number of sinecure offices were abolished. Sultan Mahmud II provided a valuable personal example of good sense, and economy, organising the imperial household, suppressing all titles without duties, and all salaried officials without functions.
Mahmud II dealt effectively with the military fiefs, the "Tımar"s and the "Ziamet"s. These had been instituted to furnish the old effective military force, but had long ceased to serve this purpose. By attaching them to the public domains, Mahmud II materially strengthened the resources of the state, and put an end to a host of corruptions. One of the most resolute acts of his ruling was the suppression of the Dere Beys, the hereditary local chiefs (with power to nominate their successors in default of male heirs), which, in one of the worst abuses of the Ottoman feudal system, had made themselves petty princes in almost every province of the empire.
The reduction of these insubordinate feudatories was not effected at once, or without severe struggles and frequent insurrections. Mahmud II steadily persevered in this great measure and ultimately the island of Cyprus became the only part of empire in which power not emanating from the Sultan was allowed to be retained by Dere Beys.
Following the loss of the Ottoman Vilayet of Greece after the Battle of Navarino against the combined British-French-Russian fleets in 1827, Mahmud II gave top priority to rebuilding a strong Ottoman naval force. The first steam ships of the Ottoman Navy were acquired in 1828. In 1829 the 62x17x7 m ship-of-the-line Mahmudiye, the world's largest warship for many years, which was armed with 128 cannons on 3 decks, was built by the Imperial Naval Arsenal on the Golden Horn in Istanbul.