Machhiwara is a town and a nagar panchayat in Ludhiana district, Punjab. The town is located 35 km away from Ludhiana, 9 km from Samrala, 40 km from Chamkaur Sahib, 25 km from Rahon. The river Satluj is towards its north & Sirhind Canal is towards its west. The town is approachable by roads from Samrala, Ludhiana, Ropar, Chamkaur Sahib, Nawan Shahr (Satluj bridge). The town is historic as 10th Guru of Sikhs Shri Guru Gobind Singh ji came to this town after the battle of Chamkaur Sahib. The town has following famous Gurudwaras namely Shri Charan Kanwal Sahib, Shri Chobara Sahib, Shri Ghani Khan Nabi Khan Sahib & Shri Kirpal Bhaint Sahib. The town has an old Shiva temple on the Ropar Road. It is believed that Pandvas spent a part of their agyatvas here. Machhiwara is famous for Gurudwara Sri Charan Kanwal Sahib named after the Guru’s feet that are compared to the lotus flower. When Aurangzeb’s army attacked the fortress of Chamkaur Sahib, Guru Gobind Singh ji successfully resisted their onslaught and slipped away into the forests of Machhiwara. The Mughal forces got wind of his whereabouts and Guru Gobind Singh ji was saved by two of his Muslim devotees who disguised him as their Muslim prophet. The place where Guru Ji rested is where the Gurdwara stands today. This holy place is sanctified by the visit of Guru Gobind Singh. After the battle of Chamkaur Sahib, enduring hardships, he pushed his way through the thick jungles infested with thorny bushes. After an arduous journey, he lay down on the bare stony ground for rest in the garden of Masand Gulab Rai. Here his pathan devotees Ghani Khan and Nabi Khan recognised him and provided all facilities to the great Guru. From here Guru was taken in a Palki (Palanquin) disguised as ‘Uch Ka Pir’. For this purpose the Guru put on a blue dress and so did his disciples accompanying him. The plan they adopted, proved a total success. Only once Mughal army intercepted the procession of the Guru but answer of Nabi Khan and Ghani Khan was so convincing that no suspicion was raised by the Mughal soldiers Thus Gurdwara Machhiwara has became a place of pilgrimage. Upto this day people remember the two Pathan brothers Nabi Khan and Ghani Khan with great respect as they risked their lives in serving the Tenth Master.
After agreeing to leave Chamkaur as commanded by his Sikhs, Guru Gobind Singh escaped into the night and the jungle surrounded by the enemy troops. In the dark the Guru was separated from his three Sikhs and left alone in the dense jungle. Guru Gobind Singh trudged through the jungle day and night, his clothes tattered and his feet blistered. Eventually the Guru reached the outskirts of Machiwara town and lay down to sleep in a garden in some bushes on the ground with a stone as his pillow. Here he was found by the three remaining Sikhs Daram Singh, Daya Singh and Man Singh. This Gurdwara marks that spot where Guru Gobind Singh was found sleeping. Guru Gobind Singh drank water from the well that appears in the Gurdwara Charan Kanwal, Machhiwara Gurdwara Nabi Khan Ghani Khan Machhiwara Gurdwara Chubara Sahib, Machhiwara foreground.
A Sikh named Gulaba Singh lived in the town of Machhiwara and provided Guru Gobind Singh and his three Sikhs refuge in his house at this spot while the enemy where prowling the countryside looking for the Guru with orders to capture or kill him.