Ali el Hujwiri is considered to be the first authoritative Sufi writer who wrote several books on Sufism. His most famous book is Kashful Mahjub, the first book on mysticism in the Persian language. His Shaikh asked him to go and settle in Lahore. According to the description in Fuwaid ul Fuwad (a compilation of the sayings of great Sufi Master Khwaja Nizamuddin Auliya of the Chishti Order) he was initially reluctant to go to Lahore as one of his co-disciples Shaikh Hasan Zanjani was already there. On insistence by his Master, he proceeded to Lahore. On entering the city of Lahore he witnessed the burial of Shaikh Hasan Zanjani, who had just passed away. He settled near Bhati Gate in Lahore, where his tomb is situated.
It was Ali el Hujwiri spoke of 'Fana' for the first time in India. Hajrat Bayazid (Abu Yazid Bistami a great Sufi Master of the Naqshbandi Order) was the first person to speak about Fana (annihilation or the complete merger of one-self with the Almighty) and Abul Qasim Gurgani, who was one of the teachers of Ali el Hujwiri, was a successor in line of Bayazid. He, however, compared annihilation (fana) to transmutation of the qualities of all things by burning fire to its own qualities, yet leaving their essence unchanged. He laid stress on following the Sharia but advocated observing sobriety and caution. In his view the true meaning of Islam could be found in the essence of Sufism.
Ali el Hujwiri continued to be greatly revered by all the saints of India, even after his death. Khwaja Muinuddin Chishti is believed to have paid a visit and offered prayers at his tomb on his arrival to India. It was during this visit that he paid respects to Ali el Hujwiri by addressing him as 'Ganj Baksh' i.e. the munificent one which also meant 'Data' (giver) in Hindi, thus he came to be popularly known thereafter as 'Data Ganj Baksh'.