He was born Sayyid Muhammad Hasan ibn Sayyid Mahmud al-Hussaini al-Shirazi in 1230 AH in Shiraz, Iran. An exceptionally intelligent child who was blessed with an extraordinary memory, he started his religious studies at the tender age of four years. By the time he was eight, he had already completed the Muqaddimaat (preliminary level) studies in the seminary. At the age of 12, he began attending advanced lessons in jurisprudence and methodology in the seminary of Shiraz. Eventually, he travelled to Isfehan and then to Karbala and Najaf in order to study under the most prominent scholars of the time, including Shaikh Jawahari and Shaikh Murtadha Ansari. Upon the death of Shaikh Jawahari, he became one of the most prominent Shia scholars in the world.
The city of Samarra contains the burial sites of Imam Ali Naqi and Imam Hasan al-Askari (peace be upon them). However, it has always been a predominantly Sunni area, and pilgrims and visitors often faced difficulties in visiting the holy shrines. In 1291 AH, Mirza Shirazi decide to migrate to Samarra and establish its first Shia seminary. The Madrasatul Shirazi continued to train many prominent scholars and jurists until it met its demise during the Saddam era. He also initiated a project to renovate the Askaryain Mosque, which contained the graves of the 10th and 11th Imams and had since fallen into disrepair.
In 1306 AH, Naseeruddin Shah of Iran granted the British Imperial Tobacco Company the exclusive rights to produce, sell, and export all of Iran's tobacco in return for annual royalties to him. The move was intended to give the Shah much-needed financial help. However, the tobacco crop was widely considered a valuable national asset by the Iranian populace, who not only prided upon the rich variety and quality of their product but depended greatly on its revenues, and selling its rights to a foreign company elicited unanimous outrage. Protests broke out all over Iran, but the Shah refused to pay any attention. Shia and Sunni scholars of Iran wrote to Ayatollah Mirza Shirazi, asking him to intervene and save the Iranian economy from the Shah's destructive policy.
This is when Mirza Shirazi issued his famous Tobacco Edict, declaring that using tobacco was akin to waging war against the 12th Imam (may Allah hasten his reappearance). All across Iran, farmers refused to grow tobacco, merchants refused to sell tobacco, and servants refused to serve tobacco. Even the Shah's wives stopped smoking in an act of solidarity with the Iranian people, and the Shah's own servants refused to prepare his hookah. Eventually, the Shah was forced to cancel the agreement. Since it was a temporal edict, Mirza Shirazi then withdrew it, so that production and usage of tobacco could continue as usual. However, the event was a stunning demonstration of the power of a Religious Authority to mobilize the masses against a monarch, one that would be repeated again less than a hundred years later.
Unfortunately, most of Mirza Shirazi's writings are not available. However, his knowledge and caliber can be gauged by the long list of well-known jurists he trained, including Akhund al-Khurasani, Sayyid Muhammad Kadhim Tabatabai, Shaikh Muhammad Hussain Naini, Muhaddith al-Nuri, Shaikh Fadlallah al-Nuri, and Sayyid Ismail as-Sadr. He is often referred to as ash-Shirazi al-Kabir (the Great Shirazi).
He passed away in Samarra in 1312 AH. His body was taken to Najaf, and he was laid to rest near his mentor Shaikh Murtadha Ansari in the courtyard of Imam Ali's (peace be upon him) shrine.