This was once the Roman residence of the Medici family of Florence. Cardinal Giovanni de' Medici, son of Lorenzo the Magnificent and the future Pope Leo X, rented this building from Sinulfo, Bishop and Treasurer of Sixtus IV. Because the Roman University was nearby and the Cardinal had a profound interest in the Humanities, he opened his library to scholars.
This, together with the extraordinary collection of ancient statues in the garden, made his home a meeting place for a variety of cultural interests of the time.
As Pope Leo X, he commissioned Giuliano and Andrea da Sangallo to reface the building in 1523 as it was to house the different members of the Medici family.
Another Medici Pope, Clement VII gave the use of the building to the young widow of Duke Alessandro de' Medici, Margaret of Austria, known in English as the Duchess of Parma. She was the natural daughter of the Emperor Charles V and gave her name to the Villa Margherita situated on Monte Mario.
The numerous decorations to the fašade were added in the first half of the 17th century.
In 1755, the building became the headquarters of the Papal State and a prison. During the Pontificate of Pius IX, it housed the Ministry of Finance and was also the headquarters of the Pontifical Post Office. After 1870, it became the Senate of the Kingdom of Italy, and King Emanuel II was present at the first sitting on November 28th 1871.
After 1929, an underground passage linked the building with Palazzo Giustiniani.