Little is know of Astalli's life before he arrived in Rome, other than that he studied law. His brother, a marquis, married the niece of his later rival for papal court power, Olimpia Maidalchini. Nonetheless, most records refer to her as his cousin.
When he was first elected to the papal throne, Pope Innocent X had appointed Camillo Pamphili as his Cardinal-Nephew. But Pamphili resigned his position to marry and was replaced by Francesco Maidalchini, nephew of Donna Olimpia Maidalchini. When Maidalchini proved to be a disgraceful failure, Innocent sought the advice of his Cardinal Secretary of State, Cardinal Panciroli who suggested Astalli.
So it was that Astalli was elevated to Cardinal on 19 September 1650 by the Pope, who simultaneously adopted him into the Pamphili family (as Camillo Astalli-Pamphili) and appointed him Cardinal-Nephew.
In his absence, though, Cardinal Panciroli died and Astalli believed his good fortune would fade with the death of his mentor. In particular, Donna Olimpia Maidalchini had been gaining favour with her brother-in-law the Pope. Seeking support from abroad, Astalli took King Philip IV of Spain for his patron.
In February 1654, with little warning, Pope Innocent stripped Astalli of his titles for allegedly revealing the secrets of state to Spain (plans to invade the Kingdom of Naples). The offence was uncovered by Maidalchini's "spy", Decio Azzolino. The Pope deprived him of the title of Cardinal-Nephew and forbade him using the family name and arms of Pamphili.
Contemporary John Bargrave would later recall that at the funeral of Cardinal Panciroli (at the Quirinal Palace), others told him that it had been the Pope's plan all along for Astalli to take responsibility for a number of failures and scandals and then be removed shortly before the Pope's death to ensure his estate was inherited by his original Cardinal-Nephew, Camillo Pamphili.
Nonetheless, when Innocent X died, Astalli was still a Cardinal and participated in the papal conclave of 1655 which elected Pope Alexander VII. He was later, rather ironically, appointed cardinal-protector of the Kingdom of Naples.
On 24 January 1661 the cardinals elected him to the post of Camerlengo of the Sacred College of Cardinals for the annual term (until 16 January 1662). In July 1661 he was consecrated Archbishop of Catania. He died at Catania on 21 December 1663.