Mustafa IV was born in 1779. His father was Abdulhamid I and his mother was Ayse Sineperver Sultan. His reign as the 29th Ottoman sultan lasted only 14 months.
The arrangements and especially the innovations made in the military field by Selim III, the son of his uncle Mustafa III who ascended to the throne after his father's death, were unsuccessful due to the opposition of the Janissaries and ulema (religious cleric). Selim was dethroned as a result of an organized uprising, and Mustafa IV became the sultan on May 29, 1807.
Although the Janissaries promised that they would no longer interfere with state affairs and would obey orders, it was not possible to prevent them from interfering and forcibly making them do what they wanted. Thus, the reign of Mustafa IV soon became the scene of great chaos, insecurity and disintegration in the state structure.
At that time, the Russian war that had begun in 1806 was continuing, but things were not going well on the front due to unrest within the army. During these turmoils, the rebels headed to the palace to restore Selim to the throne. Thereupon, Mustafa closed the palace gates and ordered the killing of his uncle and brother Mahmud II. Although Selim III was killed, Mahmud survived despite being wounded and was enthroned on July 28, 1808 as the last surviving male member of the dynasty, replacing Mustafa IV. Mustafa was imprisoned in his apartment in the palace, but was later strangled to death on his brother's orders (November 17, 1808). His body was buried in the tomb of his father Abdulhamid in Bahcekapi, Istanbul.