Mirza Muhammad Khan II (1770–1836) – was third Khan of Baku.
Early life
Mirza Muhammad Khan II was born in 1770 to Malik Muhammad Khan and Khadija Bika, sister of Fatali Khan of Quba. He was named after his grandfather, Mirza Muhammad Khan I, the founding Khan of the Baku Khanate. He ascended to the throne when his father went for pilgrimage and regency was assumed by his mother. His reign saw the Khanate's complete incorporation to Quba, to the point that Fatali Khan invited a Russian garrison to be stationed in Baku in 1785 in place of Mirza Muhammad. However, Fatali Khan died on 22 March 1789 in Baku, before further military campaigns.
Abdication
Relations were strained between Ahmed Khan of Quba and Mirza Muhammad after 1791. Following the death of Fatali Khan, Muhammadquli Agha – the uncle of Mirza Muhammad – tried to usurp Baku khanate using the inexperience of both Ahmed Khan and Mirza Muhammad as justification. He assured Ahmed Khan of his loyalty if he were to be awarded the khanate. Ahmed Khan sent an army contingent to Baku to enthrone Muhammadquli agha. Since Baku's army only consisted of about 500 men, he abdicated in favor of his uncle.
Later life
Mirza Muhammad fled to Quba with his family, including his wife and his mother. Muhammadquli betrayed treaties and claimed independence. In response, Ahmed khan mobilized troops and marched on Baku to restore Mirza Muhammad. However he was defeated by Muhammadquli.Ahmed Khan died in March 1791 and was succeeded by his 13-year-old brother - Shaykhali Khan. Mirza Muhammad again was given army to march on Baku. Shaykali further asked Count Ivan Gudovich to besiege Baku. Muhammadquli quickly sent his letter of submission to Russia, asking for help. Confused, Gudovich ordered counter-admiral Pyotr Shishkin to resolve the problem to Russia's benefit. However the order was delayed because for unknown reasons and Baku was bombarded. Muhammadquli khan made peace with Shaykhali and soon fell ill and died.