The oldest nucleus of Palazzo Doria Pamphilj in the Corso dates to Giovanni Fazio Santorio (or Santoro), cardinal of Santa Sabina, who built himself an important residence between the Via Lata and the Collegio Romano, in the years 1505 to 1507. This developed around the quadrangular courtyard, in the style of Bramante, which still today opens onto the entrance in Via del Corso.

In 1508 the cardinal was compelled by Pope Julius II Della Rovere (1503-13) to give the palace to the pope’s nephew, Francesco Maria I Della Rovere, duke of Urbino since 1508. Appointed Prefect of Rome and Captain General of the Church, the Duke took up residence in Rome, together with his wife, Eleonora Gonzaga. His son, Guidobaldo II, as heir of Francesco Maria, inherited his public roles, passing them on to his son, Francesco Maria II, husband of Lucrezia d’Este. He left the palace to his uncle, Cardinal Giulio Della Rovere.

Pietro Aldobrandini (1571-1621), Cardinal Nephew from 1593 of his uncle, Clement VIII (pope 1592-1605), until the latter’s death, bought the complex in 1601. The building was valued by his architect, Giacomo della Porta, at a price of 40,000 scudi, but was bought for 5,000 fewer, on account of his political status. From 1601 to 1647, the Aldobrandini worked on it without cease. Up to the death of Cardinal Pietro (1621), the architect of the palace was Giovanni Antonio de Pomis, succeeded by Giovanni Pietro Moraldi, who finished the works between 1646 and 1648.

On the death of Cardinal Ippolito Aldobrandini, Olimpia the younger was left as the sole heir of the patrimony (1638); in 1647 she married, as her second marriage, Camillo Pamphilj, nephew of Innocent X.

The works undertaken by the Aldobrandini continued under the Pamphilj, involving also the rear side of the palace (1653). In 1659, Camillo summoned the architect Antonio del Grande to direct the works on the Collegio Romano, which led to the creation of the Pamphilj Apartment. For this part of the Palazzo Salviati was sacrificed; this had been bought by Camillo to make space for the new apartment, which was to be finished in 1660, with its characteristic L-shaped façade on the Piazza del Collegio Romano.

The State Apartment (opened to the public in 1996) consisted of large rooms, together with antechambers and small drawing rooms to the sides.

On the death of Camillo (1666), his wife, Olimpia, and sons, Benedetto and Giovan Battista, continued the works, keeping on as architect Antonio del Grande, who was employed until 1671. Benedetto and his mother occupied the Pamphilj part, while Giovan Battista with his wife Violante Facchinetti, as first-born and heir of the Aldobrandini secundogeniture, occupied the Aldobrandini Apartment.

Antonio del Grande was followed first by Giovanni Pietro Moraldi (active between 1673 and 1677), and then by Mattia De Rossi (1678). The new palace architect, active until 1714, was Carlo Fontana, who was responsible for the demolition of the Aldobrandini Chapel, in place of which was constructed the antechamber of the piano nobile.

After the death of Innocent X, the Pamphilj preferred to reside in the palace on the Corso rather than in the residence in the Piazza Navona, as is mentioned in the breve granted to Camillo Pamphilj by Alexander VII Chigi (16 November 1657): “permission to be able to live, for his natural life, together with his Wife and Family, outside the Pal. in Piazza Navona, without incurring any penalty”. On 10 September 1666, another breve of Alexander VII renewed the concession to Giovan Battista Pamphilj, Camillo senior’s eldest son.

Giovan Battista’s son, Camillo Pamphilj junior, undertook further works on the palace between 1731 and 1734, employing Gabriele Valvassori to renew the façade on Via del Corso. The upper loggia of the Renaissance courtyard was closed at this time, converting the quadrilateral into a display area for the collection of pictures. These were works which Camillo senior had commissioned or purchased on the antiquarian market, or those which had come from the Aldobrandini patrimony, to which had been added those of Lucrezia d’Este, inherited by Pietro Aldobrandini and brought to Rome in 1598. Valvassori was followed in 1739 by Paolo Ameli, responsible for the part on the Via del Plebiscito (1744) and for the grand staircase on Via del Corso (1748-49).

On the death without heirs of Girolamo Pamphilj in 1760 (his only son, Benedetto, had died without issue in 1750), opens the struggle for the inheritance. This was contested by the Borghese and the Doria, the first on the basis of the marriage of Olimpia Aldobrandini, her first marriage, with Paolo Borghese, and the second on the basis of the marriage in 1671 of Anna Pamphilj, born of the second marriage of Olimpia with Camillo senior, with the Genoese aristocrat Giovanni Andrea III Doria. Having won the case, the Doria were compelled to come to Rome by the Pontifical State. According to the law of the period, in fact, the owner of such extensive properties in the state of the Church could not reside outside the territory. The first to take up residence in Rome was to be Giovanni Andrea IV, but only the son of Giovanni Andrea IV was to be granted, in 1765, the right to join the name of the Pamphilj to his own.

During his period as prince the Palace underwent a restoration, evident particularly in the decoration of the rooms of the State Apartment and of the quadrilateral, or Gallery. The occasion was the marriage of the prince with Leopoldina di Savoia Carignano (1767), to whom the groom wished to offer a renovated mansion.

Francesco Nicoletti, an architect from Trapani, , was employed to supervise the works; he directed the construction between 1767 and 1769, coordinating, together with other operations, the team of Late-Baroque painters, whose remit was to decorate the ceilings with painting which are evidently celebratory.

A document survives which describes the undertaking; dating to before 1768, it was drawn up by Nicoletti himself and held in the family archive. It is a plan which reproduces in elevation the rooms of the Gallery and the State Apartment, with attached the list of paintings to be put on display. The entire Gallery has been reordered on the basis of this historical evidence, after a series of works to bring the premises up to modern legal standards.

The uniqueness of the arrangement of the Doria Pamphilj Gallery derives from this; as happens rarely, a seventeenth-century collection is here displayed to the public following unusual criteria, but ones that are faithful to Late Baroque taste.

Filippo Andrea V (1813-1876), with the aid of his architect, Andrea Busiri Vici, wished to give the collection and the palace a breath of fresh air; he therefore embarked on new acquisitions and an arrangement according to new criteria. He was responsible for the choice of substituting some of the paintings of the collection with so-called “primitives”, and the acquisition of such works as the Deposition (or Compassion) of Memling.