When Murtaja Khan, Nawab of Lahore noticed that Guru had constructed a fort at Amritsar and was also strengthening his army he informed about it to King Jahangir. He also emphasized that he was making preparations to take revenge for his father's assassination,
When King Jahangir came to know about this he at once sent Wazir Khan and Guncha Beg to Amritsar in order to arrest Guru Hargobind.
But Wazir Khan who was a well wisher of the Sikh Gurus requested the Guru to accompany them to Delhi as King Jahangir wanted to meet him.
The Guru accepted the invitation and reached Delhi.
On their first meeting when King Jahangir saw the Guru, he was completely won over by his youthful charm and holiness.
King decided to befriend the Guru. So he gave royal welcome to the Guru.
But Chandu Saha could not bear it. His daughter was still unmarried and thus the rotten sore was still bleeding.
At Agra, the King fell seriously ill. The physicians tried their best but they failed to care him.
Then Chandu Shah conspired with the astrologers, who were asked to tell the King that his malady was due to wrong track of stars and it could be cared only if some holy man goes to Gwalior Fort to offer prayers to the deity.
He also pointed out that Guru Hargobind was such a holy man and he should be asked to go to Gwalior Fort.
At King's request the Guru readily agreed and left for the Gwalior Fort and stay there for 2 years and 3 months.
As per the orders of Jahangir Guru ji got daily good royal food to eat and get some money for their own expenses.
But Guru Hargobind refused to eat that food and share the money with other prisoners.
All other prisoners on daily basis listening Banis from Guru ji and forgot all cruelties given by Jahangir.
On the other side King Jahangir health was declining day by day.
Then Jahangir's wife met Sain Mian Mir and asked about Jahangirs health.
Sain Mian told her that they had taken a holy man into their custody if they will not release Him then there whole empire will be destroyed.
Then King Jahangir sent orders to release the Guru.
But Guru Hargobind put a condition that He will only go from there if all the 52 rulers will also be released. These 52 rulers are also in the custody of Jahangir and were tied to different pillars with chains and were leading miserable life.
After some confusion King Jahangir agreed and sent a message that whosoever will hold Guru's Palla can leave the fort. Because King Jahangir knew that the Rajputs never hold any one's Palla.
But next day it was miracle that 52 rulers were holding Guru ji's Chola's and all were released.
This earned for the Guru the epithet Data Bandi Chorh, the munificent liberator.