Cetti was born in Mannheim in Germany, but his parents were natives of Como. He was educated in Lombardy and at the Jesuit college at Monza. In 1765 he was sent to Sardinia to help improve the standard of education on the island. In 1766 he was appointed to the Chair of Mathematics at the University of Sassari, holding that position until his death.
Cetti took long excursions in the vicinity of Sassari, collating his discoveries in the Storia Naturale di Sardegna (Natural History of Sardinia) (1774–7). This has four volumes, covering quadrupeds, birds, fish, and insects and fossils respectively.