Machhiwara is one of the developing cities in the Ludhiana district of the Indian state of Punjab. Machhiwara is famous for Gurudwara Sri Charan Kanwal Sahib associated with Guru Gobind Singh ji and named after the Guru's feet that are compared to the lotus flower. And It is also famous for Religious Hindu Sri Shivala Bramchari Temple associated with the Pandavas of Dvapara Yuga (time of Lord Krishna) .
 The Ghorewaha were given the title of Mian by Emperor Jehangir. During Emperor Akbar's time, the Ghorewaha Raja was Rana Udho II, The Raja of Machiwara, Rana Udho actively assisted Emperor Akbar in his fight for the Delhi Throne, he captured the rebellious Bairam Khan and subsequently the Raja was allowed to retain the Jagir of Rahon worth 750 villages. The division of the Ghorewaha country took place after Rana Udho's death when all the Branches were Hindu, including that of the famed Rai Rup Chand. The principal Jagirs were taken, Rahon by the Tikka and Jadla by Bhoj Singh, who returned from Jaipur.
 Machhiwara name came from machhi (fish) + wara (ground). Satluj River runs 13 km away from Machhiwara. During the time of Guru Gobind Singh, the area was known as the Lakhi jungle (not to be confused with a historical jungle sharing the same name in the Firozpur division).
 When Humayun was struggling to regain his power on India, Humayun captured Lahore in February 1555. Another detachment of his forces captured Dipalpur. Next, the Mughal army occupied Jalandhar and their advanced division proceeded towards Sirhind. Sikandar Shah Suri sent a force of 30,000 horses with Naseeb Khan and Tatar Khan, but they were defeated by the Mughal Army in a Battle at Machhiwara.
 When Mughal Emperor Aurangzeb's army attacked the fortress of Chamkaur Sahib, Guru Gobind Singh successfully resisted their onslaught and fled into the forests of Machhiwara. The Mughal forces got wind of his whereabouts. Guru Gobind Singh was saved by two of his Muslim Pashtun devotees who disguised him as their Muslim prophet.
 The place where Guru Gobind Singh rested is where the Gurudwara stands today. There are four gurudwaras (Sikh temples) in Machhiwara. When Guru Gobind Singh was in Machhiwara, he wrote "Mitar pyare nu haal murida da akhda" (Say hello to my dear friend) in the forest of Machhiwara. The Guru composed this work while leaning against a tree in the wilds of Machhiwara after having been wandering for days with only the soft leaves of the Akk plant (Calotropis gigantea) as sustenance, sleeping directly on the lumpy forest ground, suffering from foot blisters, wearing torn attire, and sustaining cuts from the thorny vegetation of the jungle. This composition forms the sixth stanza of the Shabad Hazare chapter of the Dasam Granth.
 "Carry to the Beloved the message of His humble servant
 Soft beds are to him like a disease, if thou are not with him
 Living in the halls and mansions is like living among serpents, if thou art away
 Wine cups hurt him like the sword and things of comfort kill,
 as does the butcher's knife, if thou art not with him
 In the companionship of the friend, turf is superior to soft beds,
 
accursed really are the places if thou art away." Later-on, the Guru would be reunited with and accompanied by Dharam Singh, Man Singh, and Daya Singh in the Machhiwara jungle. After this, the local masand of Machhiwara, named Gulaba, took the Guru and his retinue into his residence for hiding from the pursuing Mughal forces. Shortly thereafter, Gulaba would die of heart failure so two Pathan followers of the Guru, named Nabi Khan and Gani Khan, whose residence was situated near Machhiwara, then assisted the Guru.
 The Machhiwara jungle that existed during Guru Gobind Singh's time, which was cut-down in the subsequent centuries, is planned to be revived by the SGPC through the planting of samplings on gurdwara land the organization owns within the locality to revive the lost forest. Machhiwara is a famous destination for Sikh pilgrims. On 13 April every year there is a festival of Vaisakhi. Another Sikh religious festival of Sabha is held on 21–23 December every year.
 Machhiwara is at 30°55′N 76°12′E﻿ / ﻿30.91°N 76.2°E﻿ / 30.91; 76.2. It has an average elevation of 262 metres (859 feet).
 Machhiwara is 38 km northeast of Ludhiana city and 69 km west of the capital city of Chandigarh. It lies only 9 km from Samrala, which is on the Ludhiana Chandigarh highway.
 As of 2011 India census, Machhiwara had a population of 24,916. Males constitute 13,102 of the population and females 11,814. The major Jat clan in the town is Dhaliwal, Rathore and Waraich. Machhiwara has male literacy is around 77.54% while female 70.56%