When the Abbasids intensified their search for the Ismaili Imam to its extreme, Muhammad had to travel out of Iran and reached as far as the valley of Farghana, which was a large, prosperous and pleasant region. Farghana was known as the "Gate of Turkistan" and now it is in Uzbekistan and partly in Tajikistan. It must be however noted that the history of Tajikistan is bound up with that of Uzbekistan in Central Asia, for the two countries are not only contiguous, but have often been governed by the same rulers and subject to the same invasions. The dominant tradition has it that Muhammad bin Ismail had taken refuge at Farghana valley, situated mainly in the eastern Uzbekistan and partly in Tajikistan and Kyrgstan, covering an area of 8500 sq. miles. The old city of Faghana, however, is in Uzbekistan, spread over 2750 sq. miles with ancient ruins, wherefrom Muhammad bin Ismail seems to have dispatched his dais in the Pamir, the highland region of Central Asia, which is centered in the Gorno-Badakhshan in Tajikistan.
It is necessary here to remark that the Ismailis in upper Oxus were reportedly deep-rooted in their faith, but unfortunately we do not have details of the Ismaili mission during the veiled era in Central Asia. These Ismailis however retained a specific literary tradition by preserving and transmitting from generation to generation an anonymous treatise, entitled "Ummu'l-Kitab" that had certainly exercised a sole source of their religious inspiration for about three hundred years till the arrival of Nasir Khusaro in this region.
"Ummu'l-Kitab" consists of the discourses of Imam Muhammad al-Bakir in response of his disciples and the famous narrators of the traditions, such as Jabir bin Abdullah Ansari, Jabir al-Jufi and Muhammad bin al-Mufazzal bin Umar. It was composed originally in Arabic and was translated into Persian in later period. W. Ivanow assigns its compilation before the beginning of the 5th/11th century, while Henry Corbin (1903-1978) places its origin in 2nd/8th century.
"Ummu'l-Kitab" remained wrapped in mist for a long period. In 1898, A. Polovtsev, a Russian official in Turkistan, who was interested in the study of Ismailism and later became the Russian Consul-General in Bombay, while visiting the upper Oxus, he discovered a copy of "Ummu'l-Kitab". In 1911, its another Persian version was unearthed from Wakhan by the Russian official, called J. Lutsch. The photocopies of both these manuscripts were deposited in the Asiatic Museum of the Imperial Russian Academy of Science at St. Peterburg. Carl Salemann, the director of the Museum was editing its text, but his death in 1916 prevented the task. Later on, W. Ivanow was destined to edit and publish the text of "Ummu'l-Kitab" in 1936. He however based his edition on the copy which was obtained by Ivan I. Zarubin (1887-1964) in 1914 at Shagnan. "Ummu'l-Kitab" is a volume of 210 pages and was also translated into Italian by Pio Filippani- Ronconi in 1966 from Naples.
After some times, Muhammad returned to his ancestral abode, Salamia and died in 197/813. He left behind six sons, viz. Jafar, Ismail, Ahmad, Ali, Hussain and Abdullah. He had also a son named Yahya.