Michelangelo returned to Florence in 1499. The was changing after the fall of its leader, anti-Renaissance priest , who was executed in 1498, and the rise of the . Michelangelo was asked by the consuls of the Guild of Wool to complete an unfinished project begun 40 years earlier by : a colossal statue of portraying David as a symbol of Florentine freedom to be placed on the gable of . Michelangelo responded by completing his most famous work, the , in 1504. The masterwork definitively established his prominence as a sculptor of extraordinary technical skill and strength of symbolic imagination. A team of consultants, including and Leonardo da Vinci, was called together to decide upon its placement, ultimately the Piazza della Signoria, in front of the . It now stands in the while a replica occupies its place in the square.
In the same year, the Medici were expelled from Florence as the result of the rise of . Michelangelo left the city before the end of the political upheaval, moving to and then to . In Bologna, he was commissioned to carve several of the last small figures for the completion of the , in the church dedicated to that saint. At this time Michelangelo studied the robust reliefs carved by around main portal of the , including the panel of the composition of which was to reappear on the Sistine Chapel ceiling. Towards the end of 1494, the political situation in Florence was calmer. The city, previously under threat from the French, was no longer in danger as had suffered defeats. Michelangelo returned to Florence but received no commissions from the new city government under Savonarola. He returned to the employment of the Medici. During the half year he spent in Florence, he worked on two small statues, a child and a sleeping . According to Condivi, , for whom Michelangelo had sculpted , asked that Michelangelo "fix it so that it looked as if it had been buried" so he could "send it to Rome ... pass [it off as] an ancient work and ... sell it much better." Both Lorenzo and Michelangelo were unwittingly cheated out of the real value of the piece by a middleman. Cardinal , to whom Lorenzo had sold it, discovered that it was a fraud, but was so impressed by the quality of the sculpture that he invited the artist to Rome. This apparent success in selling his sculpture abroad as well as the conservative Florentine situation may have encouraged Michelangelo to accept the prelate's invitation.
Late in life, Michelangelo nurtured a great platonic love for the poet and noble widow , whom he met in Rome in 1536 or 1538 and who was in her late forties at the time. They wrote sonnets for each other and were in regular contact until she died. These sonnets mostly deal with the spiritual issues that occupied them. Condivi recalls Michelangelo's saying that his sole regret in life was that he did not kiss the widow's face in the same manner that he had her hand.
In 1546 Michelangelo produced the highly complex ovoid design for the pavement of the and began designing an upper storey for the . In 1547 he took on the job of completing St Peter's Basilica, begun to a design by , and with several intermediate designs by several architects. Michelangelo returned to Bramante's design, retaining the basic form and concepts by simplifying and strengthening the design to create a more dynamic and unified whole. Although the late 16th-century engraving depicts the dome as having a hemispherical profile, the dome of Michelangelo's model is somewhat ovoid and the final product, as completed by is more so.