Agra Fort was built by the Mughal Emperor Akbar between 1565-1573 AD. It served as the main residence of the Mughal emperors until Shah Jahan later shifted the capital to Delhi. While Shah Jahan added many structures within it (including the Taj Mahal nearby), the original fort construction was commissioned by Akbar.