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 Melani 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". Atto first sang between 1636 and 1643 in the choir of the Cathedral of Pistoia. At the opening of the Teatro Novo in Venice, the fifteen-year-old took part in Francesco Sacrati's La finta pazza in 1641, and in the Carnival of 1642 in Sacratis Bellerofonte. There are records of appearances in Florence in 1644, and in the same year he went to Rome .
Melani quickly became famous nevertheless and exaggerated stories circulated that his voice was the result of being bitten by a snake. His most celebrated role on stage was as Orfeo in the opera by Luigi Rossi which premiered in 1647. His fame took Melani to France and an introduction to the court of Louis XIV, effectively presented as a gift from the Medici dukes 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; Melani able to move secretly around European states under cover of his singing. He took advantage of concerts held in the various courts to send messages and discover secrets. When the Fronde broke out in 1649, Melani had to flee Paris and went back to Italy, where he stayed in Florence, Mantua and Modena, and later also in Innsbruck and Regensburg. In 1657, he was sent by Mazarin to Bavaria to persuade the prince elector Ferdinand, a friend and ally 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.
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 had known Melani from his infancy and therefore had confidence in him, but after discovering Melani had copied his letters to Fouquet decided to publicly exile him. There is also some suggestion that the husband of Hortense Mancini convinced Louis to exile Melani, apparently out of suspicion that the latter was having an affair with his wife.
Melani left France for Rome, where he spent the next 15 years. He entered the formal service of Cardinal Giulio Rospigliosi, also from Pistoia, but continued to enjoy favour with Maria Mancini (another niece of Mazarin), 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. Nevertheless, Louis, content at the outcome of the conclave, removed the ban on Melani and awarded him the title of Abbot with an annual stipend.
In 1668, Melani sang publicly 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. He finally 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.
- Steinheuer, Joachim (2004). Die Musik in Geschichte und Gegenwart : allgemeine Enzyklopädie der Musik : 26 Bände in zwei Teilen / ,11 Personenteil ; 11, Les - Men (2., neubearb. Ausg. / hrsg. von Ludwig Finscher ed.). Kassel: Bärenreiter. ISBN 3-7618-1121-7.
- 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.
- Joachim Steinheuer: Melani. In: Ludwig Finscher (Hrsg.): The music in past and present . Second edition, personal section, volume 11 (Lesage - Menuhin). Bärenreiter / Metzler, Kassel et al. 2004, ISBN 3-7618-1121-7 , Sp. 1496–1502, here: Sp. 1498
- Monaldi and Sorti, Imprimatur, 2007