The history of the statue begins before Michelangelo worked on it between 1501 and 1504. Before the participation of Michelangelo, the Superintendent of the Florence Cathedral Office, which consisted mostly of members of the woolen society, had Influencer, Arte della Lana, planned to commission a series of twelve large Old Testament sculptures for the basilica's pillars. In 1410, Donatello made his first statue, a terracotta statue of Joshua. A figure of Hercules, also in terracotta, was commissioned from the Florentine sculptor Agostino di Duccio in 1463 and was probably made under the direction of Donatello. Eager to continue their project, in 1464 the Executive contracted Agostino to create a sculpture of David.
A block of marble supplied from a quarry in Carrara, a town in the Apuan Alps in northern Tuscany. Agostino can only begin to shape his legs, feet, and torso, create some folds, and can cut a hole between his legs. His association with the project ended, for reasons unknown, with Donatello's death in 1466, and ten years later Antonio Rossellino was commissioned to take over where Agostino had left. Rossellino's contract was terminated shortly thereafter, and the marble block remained neglected for 26 years, all exposed to the elements in the church's courtyard. This was of great concern to the Opera authorities, as such a large piece of marble was not only costly, but represented a great deal of labor and difficulty in shipping to Florence.
In 1500, an inventory of the church's workshops described the work as "a certain marble figure named David, stopped and lying on his back." A year later, documents show that the Moderator was determined to find an artist who could take this large piece of marble and turn it into a complete work of art. They turned it over for the rock they called the 'Giant', back so that a master experienced in this kind of work could examine it and express an opinion. Although Leonardo da Vinci and others were consulted, it was Michelangelo, at the age of 26, who convinced the moderator that he deserved the work. On August 16, 1501, Michelangelo was officially awarded the contract to undertake this challenging new task. He began carving the statue early in the morning of September 13, a month after he was awarded the contract. He worked on the massive statue for more than two years.
On January 25, 1504, as the sculpture was nearing completion, the Florentine authorities conceded there would be little possibility of lifting the more than six-ton statue to the roof of the cathedral. They convened a committee of 30 Florentine citizens including many artists, including Leonardo da Vinci and Sandro Botticelli, to decide on a suitable location for David. While nine different locations for the statue were discussed, the majority of members appear to have been closely divided between the two locations.
One group, led by Giuliano da Sangallo and assisted by Leonardo and Piero di Cosimo, among others, believed that, due to imperfections in the marble, the sculpture should be placed under the roof of Loggia dei Lanzi on Piazza della Signoria; Other groups thought it should stand at the entrance to the Palazzo della Signoria, the city's town hall (now Palazzo Vecchio). Another opinion, supported by Botticelli, is that the sculpture should be placed on or near the church.
In June 1504, David was installed beside the entrance to the Palace of Vecchio, replacing Donatello's bronze sculpture of Judith and Holofernes, representing an equivalent theme of heroic resistance. It took four days to move the statue half a mile from Michelangelo's workshop into the Piazza della Signoria.
In the mid-1800s, small cracks were noticed in David's left leg that could be attributed to an uneven sinking in the ground under the colossus.
In 1873, the statue of David was removed from the square, to protect it from damage, and was displayed in the Accademia Gallery, Florence, where it attracted many visitors. A copy was placed in the Piazza della Signoria in 1910.
In 1991, Piero Cannata, an artist whom police described as deranged, attacked the statue with a hammer that he hid under his coat. He later said that the spirit of a 16th-century Venetian painter commanded him to do so. Cannata was arrested while he was in the process of injuring the toes of his left foot.
On November 12, 2010, a fiberglass replica of David was installed on the roof of Florence Cathedral, in just one day. Photos of the installation show the statue the way the Workers who commissioned the work were originally expected to be seen.
In 2010, a dispute over David's ownership arose when, based on a legal review of historical documents, the municipality of Florence claimed ownership of the statue in opposition to the Italian Ministry of Culture, where city claim disputes.