The building reputedly stood on the site of a pre-Christian temple, and ranks as the first church built in Constantinople. Roman emperor Constantine I commissioned the first Hagia Irene church in the 4th century, and from May to July 381, the First Council of Constantinople took place in the church.
The Irene was later burned down during the Nike revolt in 532, with Emperor Justinian I having the church restored sixteen years later. It served as the church of the Patriarchate before the Hagia Sophia was completed in 537.
After the conquest of Constantinople in 1453 by Mehmed II, the church was enclosed inside the walls of the Topkapı Palace. The Janissaries used the church as an armory, and it also functioned as a warehouse for war booty.