Agra Fort was built by Rajput king named Raja Badal Singh who named it Badalgarh Fort. Afterward, Lodi tradition built many palaces and mosques inside the fort. It was completely renovated during the Mughal tradition. The renovation was begun by Emperor Akbar. Then Jahangir and Shah Jahan built many different structures inside the fort.
After the attack of Mahmud of Ghazni, Sikandar Lodi made Agra his capital. His child Ibrahim Lodi also made Agra his capital. Ibrahim Lodi was defeated by Babur in the first battle of Panipat in 1526. The Lodi tradition built many palaces, wells and a mosque.
After defeating Ibrahim Lodi, the first Mughal emperor Babur stayed in the fort. Humayun was sent by his father Babur to Agra and he captured the fort and got a huge treasure which incorporated a big diamond. Humayun called the diamond as Kohinoor. This is the fort where Humayun was delegated as king. He was defeated by Sher Shah Suri in 1540 and the fort was under the Suris till 1555. Humayun defeated Adil Shah Suri son of Sher Shah Suri and again became the emperor.
Hemu captured Agra in 1556 and in the battle of Tughlaqabad. He defeated Tardi Beg Khan the pioneer of Mughal forces but he was defeated in the second battle of Panipat by Akbar.
Akbar then made Agra his capital and redesigned the fort which was destroyed. After Akbar, Jahangir and Shah Jahan added many structures to the monument. Gardens, palaces, mosques and different structures were built in the fort. Shah Jahan was detained by his child Aurangzeb in the fort and he died there after eight years.
After the decline of Mughal tradition, the fort was captured by Marathas who were later defeated by Ahmad Shah Abdali in the third battle of Panipat. A Maratha named Mahadji Shinde again captured the fort in 1785. Afterward, the British captured the fort and it was under them till independence.
The fort is built in a semi-round way covering an area of 94 acre. It is built in front of the Yamuna River. The walls of the fort are 70 feet high.
Right now, there are more than two dozen monuments inside the fort though Akbar built around 5,000 monuments as indicated by Abul Fazl out of which most of them are ruined. The monuments built by Akbar have the architecture of Gujarat and Bengal. Shah Jahan has also built white marble palaces and to do this he destroyed some of the monuments. The remaining monuments in the fort are Delhi Gate, Akbari Gate, Bengali Mahal, and others.
Shah Jahan assembled three mosques inside the fort named Moti Masjid, Mina Masjid, and Nagina Masjid. Other than these, Shah Jahan additionally built several palaces. In order to give more security to the fort, Aurangzeb constructed barbicans around two gates.