Mullá Muhammad Shafi of Nayriz, son of Mullá Ali Naqi, was born in 1841. Mullá Ali Naqi set out on foot with the 9-year old Shafi upon learning of the impending arrival of Vahid. They walked a distance of 40 miles to welcome Vahid. Later, Shafi's father was killed on the mountains during the Second Upheaval.

His entire family participated in the Second Upheaval. Four sons and three brothers of Mullá ‘Abdu'l Husayn Nayrizi, Shafi's grandfather, were martyred. After the loss of Shafi's father and uncles, Shafi's grandfather raised Shafi and supported Shafi's mother. By the tender age of twelve, Shafi had already witnessed the arrest and banishment to Shiraz of his grandfather, his mother and hundreds of other Bábí women and older men.

In his diary, Mullá Muhammad Shafi described the brutal decapitation of his 80-year-old grandfather, while the prisoners were on their way to Tihrán. The soldiers, who were ordered by officials in Tihrán to move the prisoners from the mountains near Nayriz to Tihrán, committed the most atrocious acts. As they journeyed through the villages, much to the horror of the innocent prisoners who walked on foot and the villagers who looked on, the soldiers carried on the spears the heads of the prisoners who had been decapitated. They skinned the heads, discarded the skulls and then stuffed the skins with straw and speared them. This made the heads appear even more grotesque when paraded through the streets.

Before approaching the village of Abadeh, new orders were sent to bury the speared heads and to bring the remaining male prisoners to Tihrán. Shafi and his mother were released in Shiraz, where they continued to live as guests for four years in the home of the Imam Jumih. Shafi's grandfather, too old and frail to make the journey to Tihrán, was killed not far from Abadeh.

Under the guidance of the Imam Jumih of Shiraz, Shafi studied religion, Arabic, logic and poetry. He traveled extensively in Iran visiting Sarvestan, Jahrum, Kerman and Rafsanjan.

Imam Jumih requested Shafi to return to Nayriz where he was put in charge of the Mosque of Jumih, a very large historic mosque. This was the same mosque where Vahid gave lectures. In addition to administering the affairs of the mosque, Mullá Muhammad Shafi, administered many real estate and water rights for properties belonging to the mosque while spreading the teachings of the Báb.

After his first wife, Zeinab, passed away, Mullá Muhammad Shafi married Khavar Sultan, who was the niece of his mentor, the Imam Jumih of Shiraz, and the daughter of Shaykh Muhammad Husayn Vafa. Through this marriage, Shafi substantially increased his prestige and station amongst the clergy. He was respected by the government officials and used his position to act as a defender of the Bábís.

Bahá'u'lláh showered Shafi with unprecedented affection and revealed many tablets in his honor. Many of these tablets were in Bahá'u'lláh's own handwriting. In 1883, a tablet was sent to Mullá Shafi, which contained within the Tablet of Visitation for Vahid.

At one point, Shafi was appointed trustee of the Huquq'u'llah. He was credited with teaching the faith to the Governor of Nayriz. Bahá'u'lláh asked Shafi to be a judge amongst the Bahá'ís, to settle disputes amongst others and to officiate over marriages.

Mullá Muhammad Shafi also received many tablets from ‘Abdu'l-Bahá. When he died, ‘Abdu'l-Bahá revealed a Tablet of Visitation for him.

Bahá'u'lláh granted permission to Shafi to visit Him in Baghdad. Accompanied by another Bahá'í, they walked all the way from Nayriz to Baghdad.

Shafi defended the Faith against the Covenant Breakers. Among his accomplishments was the protection of the community from Mírzá Yaya, the half-brother of Bahá'u'lláh, Mírzá Muhammad Ali, the brother of ‘Abdu'l-Bahá, and Hájí Muhammad Karim Khan.

So intolerant to anything that would harm the Faith, when a member of the Nayriz Bahá'í community stated at a meeting that Bahá'ís were to follow Mírzá Yahya after the ascension of Bahá'u'lláh, Shafi severely slapped the man in the face. The man left immediately, feeling so ashamed that he did not attend any Bahá'í meetings for a year. Eventually Shafi went to the man's house and brought him back to a community gathering.

To Mullá Shafi's eternal credit is his success in appointing many Bahá'ís to key positions by virtue of being trusted by the Governor of Nayriz – Phat Ali Khan. Because of his friendship with Shafi, the governor, Phat Ali Khan eventually became a Bahá'í, although he tried to keep his faith as a secret, he received a tablet from ‘Abdu'l-Bahá.

The enemies of the faith were alarmed at the rapid growth of the Bahá'í community and the unprecedented influence of Mullá Muhammad Shafi. In the early years, before Phat Ali Khan became sympathetic to the Bahá'ís, they encouraged the governor to attack the Bábís and Bahá'ís again.

When Shafi realized that the governor might just do that, he prompted a few brave survivors of the mountain upheaval, to warn the governor that harm might come to him if he continued the harassment of the Bahá'í community. The governor was so frightened that he changed his attitude towards the Bahá'ís. He called on Mullá Muhammad Shafi to express his regret about the actions of his father and his own conduct. The governor signed a written agreement that he would not harm Bahá'ís. Shafi found him to be sincere, so Shafi also signed the document. As a consequence, the relations between Muslims and Bahá'ís in Nayriz improved tremendously thereafter. The governor even began to consult with Shafi about the community affairs.

The Bahá'í community flourished under the leadership of Shafi. Their number reached a few thousand. Shafi counselled Bahá'ís against being afraid of their sacred destiny and to this day, the descendants of many of those early believers are still serving the cause throughout the world.

The Nayriz Bahá'í community was blessed by receiving many tablets and letters from both Bahá'u'lláh and ‘Abdu'l-Baha which addressed Bahá'í laws, giving instructions on how to conduct their lives and ways in which to serve the Faith and humanity.

As an example of his kindness, Shafi would go to the houses of the poor early in the morning and would leave food and clothing at their doorsteps anonymously. While he was generous and kind to all, especially the poor and disadvantaged, Mullá Shafi would not hesitate to rebuke vehemently those who chose to be rude and unruly or disrespectful of the precepts of the Faith. When his mother advised him not to fight the Mullás, he responded firmly that he would not hide under a chador.

The sudden death of his son ‘Abdu'l Husayn was the most traumatic event in Shafi's life. He was known to go often to the mosque where he prayed for such a long time that he would pass out and had to be carried home. On hearing about this, Bahá'u'lláh sent him a tablet consoling and comforting Mullá Shafi who was distraught over his departed son.

At the request of Bahá'u'lláh, Mullá Shafi put the final touches on his diary. According to Kasravi, the famous historian, Shafi finished his book soon after his return from Baghdad and sent a copy to Bahá'u'lláh. It was a diary so precise and complete that it later became the prime source of information for many future historians including Nabil, Nicolas, Mazandarani, Avareh, Rouhani, Faizi and Shaykh Bahá'í.

Mullá Shafi died in 1900 at the age of 59 due to complications from bronchitis, extreme fatigue and weakness after fasting for seven days. After Shafi's death, Aga Siyyid Doavod, the leading Mullá of Nayriz, ceremoniously placed Shafi's turban on the head of Shafi's 15-year-old son, while declaring confidently that Shaykh Muhammad Husayn would continue the legacy of his father, Mullá Muhammad Shafi.