Melani was born in Pistoia, the third of seven sons of a local bell-ringer. He was castrated at a young age so that he could become a singer. Three other brothers also became castrati, along with two cousins. His brothers Alessandro Melani and Jacopo Melani both became celebrated composers.
He soon attracted the patronage of nobleman Mattias de' Medici. Roger Freitas argues that the "circumstantial evidence is convincing" that Melano has an affair with Duke Carlo II of Mantua: Melani indicated that "both men had sex with the same (unidentified) page at the court of Innsbruck".
Melani quickly became famous nevertheless and stories circulated that his voice was the result of being bitten by a snake. His most celebrated role was as Orfeo in the opera by Luigi Rossi which premiered in 1647. His fame took Melani to the court of Louis XIV of France, effectively promoted as a gift from the Medici to the opera-loving Queen Anne. Cardinal Mazarin thereupon introduced him to the world of espionage, where Melani quickly shone as he had in music. He took advantage of concerts held in the European courts to send messages and discover secrets. In 1657 Melani was sent by Mazarin to Bavaria to persuade the prince elector Ferdinand, a friend of France, to put himself forward as candidate for Holy Roman Emperor. Although the operation ultimately failed, Mazarin came to appreciate Melani's diplomatic abilities even more.
Mazarin's death reversed Melani's fortunes. Especially damaging was his closeness to the superintendent of finances, Nicolas Fouquet, who was arrested and imprisoned. Louis XIV had known Melani from infancy and had great confidence in him, but after discovering Melani had copied his letters to Fouquet decided to publicly exile him. There is also suggestion that the husband of Hortense Mancini (niece of Cardinal Mazarin) convinced Louis of exile, apparently out of fear of an affair with his wife.
He left France for Rome, where he spent the next 15 years. In Rome, he entered the service of Cardinal Giulio Rospigliosi, also from Pistoia. He also continued to enjoy favour with Maria Mancini, niece of Mazzarin, with whom he maintained a correspondence of more than forty years.
After the death of Pope Alexander VII, Melani's patron Rospigliosi rose to the papacy as Clement IX. Melani took part in the conclave as an assistant, but it is unknown if he played a role in influencing the election. In response Louis XIV, very happy at the outcome of the conclave, removed the ban on Melani and awarded him the title of Abbot with an annual income.
In 1668 Melani sang for the last time at Palazzo Colonna, and from then on dedicated himself exclusively to politics and diplomacy, writing several books on Rome, advising the King of France, mediating with the German princes, and acting as go-between among the Italian States. Melani died at the age of 88 in 1714 in Paris. The assets he left in his will were significant: besides rich buildings and warehouses in Italy and France, he also left a large library.
Melani has been the object in recent years in the novels by Rita Monaldi and Francesco Sorti beginning with Imprimatur and continuing with Secretum and Veritas . The two authors published some documents written from Melani including a letter to Louis XIV.
- Roger Freitas, Portrait of a Castrato: Politics, Patronage, and Music in the Life of Atto Melani, University of Rochester, 2009
- Roger Freitas, "The Eroticism of Emasculation: Confronting the Baroque Body of the Castrato" in The Journal of Musicology, Vol. 20, No. 2. (Spring, 2003), pp. 196-249.
- Monaldi and Sorti, Imprimatur, 2007