In in 1444, Cosimo the Elder commissioned the building of the Palazzo Medici Riccardi to the architect Michelozzo, as a Medici family residence. This design was preferred to that by Filippo Brunelleschi because, as Vasari recounts, Cosimo the Elder defined the idea of the palace as "too sumptuous and magnificent, to the point of making citizens feel envy rather than recognising its grandeur and embellishment for the city, or convenience in itself". The great jewel located inside the building is the Chapel of the Magi, frescoed by
with a cycle of frescoes depicting the Journey of the Magi. The theme occupies three of the chapel walls. In Gozzoli's work, art, history and public celebration merge together, with a chivalrous procession in which characters from the Medici family painted in sumptuous robes can also be identified.
After the death of Lorenzo the Magnificent in 1492, the palace was confiscated by the new government, led by Girolamo Savonarola. Numerous statues and ornaments were moved to Piazza delle Signoria, such as Michelangelo's David and Donatello's Judith and Holofernes. Upon their return to Florence in 1512, the Medici family moved back into palace in Via Larga and lived there until 1540. It was Duke Cosimo I dei Medici who decided to leave the family palace and move to Palazzo della Signoria. In the middle of the 17th century the building was sold to the Marquis Gabrielli Riccardi, who enlarged it with some Baroque-style interventions. It was in this period that Luca Giordano created the Gallery in which he frescoed the Apotheosis of the Medici family. The economic decline of the Riccardi family made the purchase of the building possible and it thus became state property and the headquarters of the Florentine administrative offices, until it became the property of the Provincial Authority of Florence.