The existence of the historic town of Loni dates back to the times of Lord Rama. It is believed that a demon named Lavanasur was killed by Shatrughan, the younger brother of Ram at this place. Going by another legend, the town was founded by a king called Lonnkaran who also built a fort and named it Loni.
The fort lasted until 1789 when it was destroyed by Muhammad Shah who used its bricks and other building material to build a garden and a pond. According to historians, Loni was part of the kingdom of the warrior King Prithviraj Chauhan. The remains of a fort built by him are still visible to the tourists.
The city boasts of three large groves that were set up during the Mughal period. They were called Kharanji Bagh, Uldipur and Ranap groves. The first two groves were sown by Zinat Mahal, the wife of the last Mughal emperor Bahadur Shah Zafar.
The British government seized these groves and sold them to Shaikh Ilahi Baksh of Meerut. The boundry wall of the third grove, Ranap which was popularly called Abadi Bagh Ranap by the residents of the area, still remains visible.