He was a long-time friend and supporter of his teacher, Galileo Galilei, and in turn teacher to Galileo's son. He assisted Galileo's study of sunspots and participated in the examination of the theories of Nicolaus Copernicus. Castelli was interested in mathematics and hydraulics. He was appointed as a mathematician to the University of Pisa, replacing Galileo, and later at the University of Rome La Sapienza.
Castelli died in Rome. His students included Giovanni Alfonso Borelli and Evangelista Torricelli, the inventor of the barometer and an early proponent of the air pump. He recommended Gasparo Berti for a chair of mathematics at Sapienza. Berti was to be his successor at the university, but he died before he could take the post.
He published Mensuration of Running Water, an important work on fluids in motion, and then his Geometrical Demonstrations of the Measure of Running Waters in which the publishing notes described him as Abbot of Cassina[disambiguation needed] and Mathematician to Pope Urban VIII, once a supporter of his mentor, Galileo.
He dedicated both publications to "the most Illustrious, and most Excellent Prince", Taddeo Barberini, a nephew of Pope Urban. In reality, Barberini was neither; he had appointed himself "Prince" of the Palestrina comune bought by the Barberini family and was "illustrious" because he had amassed great wealth during his uncle's reign as Pope.
- "Galileo Galilei, Letter to Benedetto Castelli (1613)", Religion and Science. (Source of the English translation).