The Krishnagiri fort along with the surrounding areas was earlier known as baramahal. It was then presented to Jagadevarayan by the Vijayanagar for his display of courage and valour in the battles he fought. Jagadevarayan made Jagadevi his capital. Later in the 17th century Bijapur Sultanate captured the fort and baramahal. It was then given to Shahaji, father of Shivaji as jagir. He made Bengaluru his headquarters and became the ruler of this area. Later when Shahji died his younger son Vyankoji (Ekoji) became the ruler. Again in the 1670s the fort was captured by Chatrapati Shivaji from his younger brother Vyankoji during one of his expeditions to Deccan.
Again in the 18th century Krishnagiri fort and baramahal was captured by Hyder Ali as per the instructions given to him by Chikka Devaraja Wodeyar, the king of Mysore. Much later he severed ties with the King of Mysore and retained these areas. He rules the surrounding places and made Srirangapatna his own capital. During the First Mysore War a long blockade took place here that resulted in surrendering the fort to the British in the year 1768. The fort was attacked by the British troops under Lt. Col. Maxwell in November 1791. This event took place during the third Mysore War that resulted in 50 British casualties. As all the officers and the members in the troop were either wounded or dead they had to move back. The fort remained under the possession of Tipu Sultan until the Treaty of Srirangapatna in 1792. Later it went into the hands of the British. Presently the fort is maintained by the Archaeological Survey of India and serves as a tourist spot.