Everyone worships the son of Pawan, Hanuman ji and also recites Hanuman Chalisa, but very few know when it was written, where and how it originated.
The subject dates back to 1600 AD, during the reign of Akbar and Tulsidas.
Once while Tulsidas ji was on his way to Madura, he stopped in Agra before nightfall and the people came to know that Tulsidas ji had come to Agra. When the people heard this, they went out to see him. When Emperor Akbar learned of this, he asked Birbal who this Tulsidas was.
Then Birbal said, he translated Ramacharit Manas, who was a great devotee of Rama, I also came to see him. Akbar also expressed his desire to see him and said that he wanted to see him too.
Emperor Akbar sent his army to Tulsidas ji and conveyed the emperor's message to Tulsidas ji that you should attend the Red Fort. Upon hearing this message Tulsidas ji told that I was a devotee of Lord Rama, the emperor and what should I do with the Red Fort and clearly refused to go to the Red Fort. When the matter reached Emperor Akbar, he was very upset and furious.
When Tulsidas ji reached the Red Fort built with chains, Akbar said that you look like an attractive person, show a little charisma. Tulsi Das said that I am only a devotee of Lord Rama and not a magician who can show you any charisma. On hearing this, Akbar became angry and ordered them to be chained and imprisoned.
On the second day, millions of monkeys simultaneously attacked the Red Fort in Agra and destroyed the entire fort.
Panicked, then Akbar called Birbal and asked what was going on, then Birbal said, Huzur, do you want to see the glory, see. Akbar immediately drove Tulsidas out of the dungeon. And the chains were opened. Speaking to Tulsidas ji Birbal I said I was punished without guilt.
I remember Lord Rama and Hanuman in the dungeon, I was crying. And crying, my hands were writing something on their own. These 40 Chaupayas were inspired by Hanuman ji.
After his release from prison, Tulsidas ji said, "How Hanuman helped me out of prison, and whoever is in trouble, all his sufferings and hardships will be over." It is called Hanuman Chalisa.
Akbar was very ashamed and apologized to Tulsidas ji and sent him to Madura with full respect and full protection.
Today everyone is reciting Hanuman Chalisa. And the grace of Hanuman is upon all of them.
And all hardships will be removed. That is why Hanuman ji is also known as "Sankat Mochan".