Qazi Muhammad was born into a noble Kurdish family from Mahabad. His father had cooperated with Ismail Shimko during his revolt against the Iranian government in the 1920s, and his brother Sadr Qazi was a member of the Iranian parliament. After his father’s death, he was nominated as a judge in Mahabad in the 1930s. Qazi Muhammad later became a member of the Komala Zhian I Kurd, a leading Kurdish organization in Iran at the time supported by the Soviets, in April 1945. Soon after he became its leader. Muhammad acted as the President of the Republic of Mahabad, which was founded in January 1946, and declared publicly in March of the same year. He was also the founder of the Kurdish Democratic Party of Iran, that was established after the need for a more transparent party was felt by its adherents. (Komeley Jiyanewey Kurd existed prior to that, as a secret organization.) Mustafa Barzani, one of the leaders of the nationalist Kurdish movement in Iraqi Kurdistan, was also the commander of its army. His cousin, Mohammed Hossein Saif Qazi, was a minister in his cabinet. In April 1946, with the support of the Soviets, Muhammad signed a peace treaty with Ja’far Pishevari of the Azerbaijani republic in which they exchanged assurances that the Azerbaijani and Kurdish minorities rights in each republic would be preserved. A year later, after the Soviets withdrew from Iran, the socialist Kurdish Republic was crushed by Iran’s central government.
One of his sons, Ali Qazi, is today an active member in the Kurdish movement. One of his daughters, Efat Ghazi, was killed by a letter bombin Västerås, Sweden, in 1990. The bomb was addressed to her husband, the Kurdish activist Emir Ghazi. Some analysts speculated that the Iranian government might have been involved in the assassination.