Alfonso Litta was born in Milan on 19 September 1608, the second child of Marquess Pompeo of the House of Litta. His mother, widowed in 1609, in 1622 married Antonio Ferrer, great-chancellor of the Duchy of Milan (at the time under the Spanish government). Ferrer brought Alfonso with him to Spain to the court of Philip IV. There Alfonso studied canon law at the University of Salamanca, and later completed his studies, earning a doctorate in utroque iure, at the University of Bologna in 1628.
In 1628 he entered the order of lawyers of Milan and the clerical state; in 1630 he moved to Rome where Pope Urban VIII appointed him referendary of the Tribunals of the Apostolic Signature. As an administrator of the Papal States, he served as governor of Orvieto in 1637, Spoleto from 1638 to 1639, Camerino from 1639 to 1643, and Vice-legate of Bologna, Ferrara and Romagna in 1643. He was Commissary general of the papal army in 1643, and governor of Ascoli in 1645 where he suppressed an uprising.
In 1646 he was appointed governor of the Campagne and Maritime Province during the revolt of Masaniello. He sided with the Spanish government, disclosing to them the scheme hatched by the French and the Barberini. For this act he gained the esteem of the Spanish government, but made enemies in Rome. In 1648 he became governor of the Marche.
On 17 June 1652 Alfonso Litta was appointed Archbishop of Milan. He was consecrated bishop on 24 June 1652 in Rome by Cardinal Giulio Roma, and he made his entrance in Milan as Archbishop on 17 November 1652.
As bishop, Alfonso Litta followed in Saint Charles's footsteps: he convened two diocesan synods, in 1659 and 1669, and made some pastoral visits to the pieves far away from Milan. He was a guardian of the Ambrosian rite; he edited in 1679 some editions of the Missal and of the Breviary. He also restored the crypt of the Cathedral of Milan.
During the 1655 invasion of the Duchy of Milan by Thomas Francis of Savoy, Litta organised a militia of 900 armed clerics. He defended the rights of the Church against the lay government: his frequent collisions with the Spanish rulers were related mainly to the right of asylum in the churches, the administrastion of foundations that had been established with religious affiliations (such as hospitals) and several cases of etiquette.
Due to his firm and determined nature, and many enemies, Litta was not quickly named Cardinal. He was appointed Cardinal in pectore on 14 June 1664 and formally appointed Cardinal Priest of Santa Croce in Gerusalemme on 15 February 1666. He participated in the Conclaves of 1667, 1669 and 1676.
In 1675 Litta moved to Rome in order to participate in the jubilee of that year, and because of health problems and clashes with the Spanish government he was told to resign from the Archbishopric of Milan. He did not resign, but was unable to return to Milan. He died in Rome on 28 August 1679, and his remains were buried first in the Roman church of San Carlo al Corso, and later transferred to the north nave of the Cathedral of Milan.