Coming from humble origins, Giovanni Antonelli was born in Candeglia, near Pistoia, and soon showed signs of being a gifted student. Pietro Panichi, a lay brother of the Piarists of Pistoia, put him in touch with Giovanni Inghirami, who planned to make him become a primary school teacher at the Scuole Pie in Florence. In 1834 he became a novice at the at the convent of il Pellegrino and the following year he started studying at San Giovannino, where his teachers included Numa Pompilio Tanzini, Eusebio Giorgi and Inghirami himself.
In 1836 he took the cloth as a Piarist and in 1840, after a period as an assistant at the Osservatorio Ximeniano, he took the place of Inghirami, who was ill, as teacher of astronomy. The following year, having been ordained, he became a primary school teacher, firstly at San Carlo in Oltrarno and then at San Giovannino, where his pupils included some that would later have glittering careers, such as Filippo Cecchi or Celestino Zini.
After a year at the Collegio di Cortona, he was called back to Florence to replace Inghirami (who had been temporarily moved to Rome) as a teacher of higher mathematics and director of the Osservatorio; four years later he replaced Inghiramii on a permanent basis.
He was an eclectic scholar rather than a true astronomer, his interests ranging from railways to meteorology, the study of the nature and effects of heat and hydraulics. He was actively engaged with water systems, both with a plan to reclaim the marshes of Fucecchio and with a detailed study of the lagoon of Orbetello, and he also carried out a structural analysis of the aqueducts of Grosseto and Florence.
He took the place of Eugenio Barsanti, after his sudden death, in the venture relating to the construction of an internal combustion engine, which, however, never came to fruition. Soon afterwards, together with Emilio Bechi and Filippo Cecchi, he invented a new steam engine for ships and trains, but his attempt at marketing it was unsuccessful. He died in Florence in 1872.
Raffaello Caverni, who had attended the Scuole Pie of San Giovannino during the time when Antonelli was a teacher and director of the Osservatorio, wrote in 1870 some critical observations, which were never published, on the astronomical commentary that Giovanni Antonelli had provided for the edition of the Divina Commedia by Niccolò Tommaseo for the Milan publisher Pagnoni. It is, however, unlikely that Antonelli ever read these observations.