The village of San Leonardo, which went on to be called Robasacco from the eighteenth century onwards, dates back to the Middle Ages, when it formed part of the municipalities of Medeglia, Bironico, Rivera and Camignolo. Then, in the early sixteenth century, Robasacco, Medeglia and Isone were transferred from the community of Lugano to the county of Bellinzona. It initially came under the parish of Bironico, but then fell under the administration of the vice-parish of Medeglia, breaking away from it in 1809.
In the meantime, after a long dispute, the municipality became autonomous in 1805, separating from Medeglia. The population reached its peak in the second half of the nineteenth century, with more than 300 inhabitants according to the census, but it suffered from emigration throughout the twentieth century.
By the start of the twenty-first century, its population had fallen to around 100. Robasacco maintained its identity as an autonomous municipality until 2005, when it merged with Cadenazzo.