Mian Mir was a friend of God-loving people and he would shun worldly, selfish men, greedy Emirs and ambitious Nawabs who ran after faqirs to get their blessings. To stop such people from coming to see him, Mian Mir posted his mureeds (disciples) at the gate of his house.
Once, Jahangir, the Mughal emperor, with all his retinue came to pay homage to the great faqir. He came with all the pomp and show that befitted an emperor. Mian Mir's sentinels however, stopped the emperor at the gate and requested him to wait until their master had given permission to enter. Jahangir felt slighted. No one had ever dared delay or question his entry to any place in his kingdom. Yet he controlled his temper and composed himself. He waited for permission. After a while, he was ushered into Mian Mir's presence. Unable to hide his wounded vanity, Jahangir, as soon as he entered, told Mian Mir in Persian: Ba dar-e-darvis darbane naa-bayd ("On the doorstep of a faqir, there should be no sentry").
Pir Mian Mir, whose mind and soul were one with god, caring little for the emperor's irritation, replied in Persian: Babayd keh sag-e-dunia na ayad ("They are there so that the dogs of the world/selfish men may not enter").
The emperor was embarrassed and asked for forgiveness. Then, with folded hands, Jahangir requested Mian Mir to pray for the success of the campaign which he intended to launch for the conquest of the Deccan. Meanwhile, a poor man entered and, bowing his head to Mian Mir, made an offering of a rupee before him. The Sufi asked the devotee to pick up the rupee and give it to the poorest, neediest person in the audience. The devotee went from one dervish to another but none accepted the rupee. The devotee returned to Mian Mir with the rupee saying: "Master, none of the dervishes will accept the rupee. None is in need, it seems."
"Go and give this rupee to him," said the faqir, pointing to Jahangir. "He is the poorest and most needy of the lot. Not content with a big kingdom, he covets the kingdom of the Deccan. For that, he has come all the way from Delhi to beg. His hunger is like a fire that burns all the more furiously with more wood. It has made him needy, greedy and grim. Go and give the rupee to him."
Sai Mian Mir, holds a pivotal legendary place in Sikhism and in Sikh history. Sikh people around the world learn about him, his spiritual contribution and his place in Sikh history. A major Pakistani newspaper reporter described his recent visit to the shrine, "I met many Sikh Yatris who had come to pay homage to this great saint. Many of them were from Pakistan, while some had come from India. Mostly Sikh Yatris come here during the birthday celebration of Guru Nanak." The reporter asked the Sikh Yatris as to why they like to visit Mian Mir's shrine, "To us, Mian Mir Sahab is as divine as the saints of Sikhism. Sufis and Gurus, and their message, transcends geographical and cultural boundaries. They are the beacons of light."
Guru Arjan Dev Ji, (1563 – 1606) the fifth Sikh Guru, often visited Lahore, the birthplace of his father (the fourth Guru, Guru Ram Das) to meet his relatives. On the occasion of one of such visits, he called on Mian Mir. Both men eventually became close friends. Mian Mir was a well-known saint. "Being a man of God, no barriers of caste or creed marked his thought. He loved those who loved God."
Guru Arjan Dev was responsible for the construction of many public water tanks and buildings. In 1588, he planned to build a temple in the centre of the holy water tank called Amritsar or the pool of the nectar of immortality. As the temple was to be thrown open to people of all religions, castes, creeds and climes, he invited Mian Mir to lay the foundation stone of the Harmandir Sahib of Amritsar, the most sacred temple of Sikhs (now known worldwide as the Golden Temple). Mian Mir came to the city of Amritsar wearing a religious mendicant's long cloak made up of patches of coarse wool and a cone-shaped cap, with a rose flower on top.
Mian Mir was given one of the warm welcomes for which Guru Arjan Dev was famous. The two holy men embraced each other in sincere love and regard. The purpose of the temple was disclosed to the Sufi saint. Mian Mir was delighted at the fine objectives the Guru had in mind. The foundation-stone was laid in January 1588. "Never before and, for that matter, never after has the foundation stone of the highest religious seat of a religion ever been laid by the head of another religion. This remains the unique privilege of the Sikh temple."
In 1606, Guru Arjan Dev Ji was implicated in the affair of Prince Khusraw, who had rebelled against his father, Emperor Jahangir. He was imprisoned in the Lahore Fort and tortured. When Sai Mian Mir heard about it, he came to see the Guru. He found Guru Arjan Dev Ji calm and serene, having completely resigned himself to the will of God. Mian Mir suggested to Guru Ji whether he should intercede with Emperor Jahangir on his behalf. Guru Ji forbade him saying that God's will must have its course unchecked, as it was not proper to interfere with its working.
A couple of years after the death of Guru Arjan Dev Ji, his son and successor Guru Har Gobind, who was thirteen years of age was called on Mian Mir at Lahore.
Guru Tegh Bahadur, the son of Guru Har Gobind Ji and the ninth Guru, as a child met Sai Mian Mir Ji who blessed him.
After having lived a long life of piety and virtuosity, Hazrat Mian Mir died on 22 August 1635 (7 Rabi' al-awwal, 1045 according to the Islamic Calendar). He was eighty-eight years old.
His funeral oration was read by Mughal prince Dara Shikoh, who was a highly devoted disciple of the Saint. There is a hospital named after him in his hometown Lahore, called Mian Mir Hospital.
He was buried at a place which was about a mile from Lahore near Alamganj, that is at the south-east of the city. Hazrat Mian Mir's spiritual successor was Hazrat Mullah Shah Badakhshi. Hazrat Mian Mir's Mazar (Mausoleum) still attracts hundreds of devotees each day and he is revered by many Sikhs as well as Muslims. The tomb's architecture still remains quite intact to this day. His death anniversary ('Urs' in Urdu language) is observed there by his devotees every year.