The building was originally designed by Gian Lorenzo Bernini for the young Cardinal Ludovico Ludovisi, nephew of Pope Gregory XV. However, with the death of Gregory XV by 1623, work stopped, and was not restarted until the papacy of Pope Innocent XII (Antonio Pignatelli), when it was completed by the architect Carlo Fontana, who modified Bernini's plan with the addition of a bell gable above the main entrance. The building was designated for public and social functions only due to Innocent XII's firm antinepotism policies which were in contrast to his predecessors.
In 1696 the Curia apostolica (papal law courts) was installed there. Later it was home to the Governatorato di Roma (the city administration during the papal period) and the police headquarters. The excavated obelisk of the Solarium Augusti, now known as the Obelisk of Montecitorio, was installed in front of the palace by Pius VI in 1789.