Agra Fort was originally a brick fort built by the rajputs, the Hindu kings who ruled the land. Later, the first Sultan of Delhi, Sikander Lodi shifted to Agra, and lived in the fort. It was during this time that Agra became important as the second capital.
His son Ibrahim Lodi held the fort for nine years, until he was defeated and killed in the battle of Panipat ever, it was Akbar who made Agra the capital of the Mughal Empire and who rebuilt the fort. It was rebuilt in red stone, and 1,444,000 builders worked on it for eight years. It was completed in 1573. Akbar's grandson, Shah jahan, also made some changes to this fort. Shah jahan later imprisoned, and it is believed that he died in a tower in Agra Fort that had a view of his masterpiece, the Taj Mahal.