Introduced by his father to literature while very young, in addition to his native Italian, Ferretti mastered not only Latin and Ancient Greek but also French and English, and began writing verse early. Even though he worked in the tobacco industry from the age of about 30 until he was over 60, he was extremely prolific, writing "everything from love letter to odes and welcoming speeches", and numerous opera libretti.
His first big success was La Cenerentola, written at great speed for Rossini over Christmas in 1816. Ferretti married the singer Teresa Terziani in 1820, and their house was continually visited by musicians and poets, including Donizetti who had been given a letter of introduction to Ferretti by Johann Simon Mayr. They became good friends after Donizetti arrived in Rome in October 1821 for the preparation of the production of his Zoraida di Granata, which became his first major success. Ferretti worked on revising Bartolomeo Merelli's libretto for the opera.
Among his most successful librettos are Mercadante’s Scipione in Cartagine, Rossini’s La Cenerentola and Matilde di Shabran, Pacini’s Cesare in Egitto, Il nuovo Figaro and Donizetti’s Zoraida di Granata, L’ajo nell’imbarazzo, Il furioso all’isola di San Domingo and Torquato Tasso.