After the Amnesty Act of 1913, dedicated to the 300th anniversary of the Romanov dynasty, Rasulzade returned to Baku, left the Hummet party he was previously member of, and joined the then secret Musavat (Equality) party in 1913, established in 1911, which initially promoted pan-Islamist, pan-Turkist and Socialist ideas,or more precisely Pan-Islamism yet with affinity for greater cultural bonds with the Turkic world, and which eventually became Azerbaijani nationalist party, and quickly became its chief. In 1915 he started to publish party's newspaper "Açıq Söz" (Open word) which lasted till 1918. When February Revolution happened, Musavat together with other secret political parties in Russian Empire quickly legalized and became a leading party of Caucasian Muslims after it merged with Party of Turkic Federalists headed by Nasib Yusifbeyli. October revolution in 1917 lead to secession of Transcaucasia from Russia and Rasulzade became head of Muslim faction in the Seym, parliament of Transcaucasian Federation. After the dissolution of the Transcaucasian Federation Muslim faction re-organized into Azerbaijani National Council, whose head Rasulzade was unanimously elected in May 1918.
On May 28, 1918, the Azerbaijani National Council, headed by Rasulzade, declared an independent Azerbaijan Republic. Rasulzade also initiated the establishment of Baku State University together with Rashid Khan Gaplanov, minister of education with the funding of oil baron Haji Zeynalabdin Taghiyev in 1919. Rasulzade taught Ottoman literature at the University.
|“||The flag once raised will never fall!||”|
—Mammed Amin Rasulzade
After the collapse of Azerbaijan Democratic Republic in April 1920, Rasulzade left Baku and went into hiding in the mountainous village of Lahij to direct the resistance to Sovietization, but in August 1920, after Soviet Russian army crushed the rebellions of Ganja, Karabakh, Zagatala and Lankaran, led by ex-officers of the Azerbaijani National Army, Rasulzade was arrested and brought to Baku. It was only due to his earlier rescue of Joseph Stalin in 1905, that Rasulzade was released and transferred from Azerbaijan to Russia. For the next two years, Rasulzade worked as the press representative at the Commissariat on Nations in Moscow. He was seconded to Saint Petersburg in 1922 from where he escaped to Finland.