Andrea del Castagno was born at Castagno, a village near Monte Falterona, not far from Florence. During the war between Florence and Milan, he lived in Corella, returning to his home after its end. In 1440 he moved to Florence under the protection of Bernadetto de' Medici. Here he painted the portraits of the citizens hanged after the Battle of Anghiari on the facade of the Palazzo del Podestà, gaining the nickname of Andrea degli Impiccati.
Little is known about his formation, though it has been hypothised that he apprenticed under Fra Filippo Lippi and Paolo Uccello. In 1440–1441 he executed the fresco of Crucifixion and Saints in the Ospedale di Santa Maria Nuova, whose perspective-oriented construction and figures shows the influence of Masaccio.
In 1442 he was in Venice where he executed frescoes in the San Tarasio Chapel of the church of San Zaccaria. Later he also worked in St Mark's Basilica, leaving a fresco of Death of the Virgin (1442–1443).
Back in Florence, he designed a stained window with Deposition for the local Cathedral. On May 30, 1445 he became a member of the Guild of the Medicians. From the same year is the fresco of Madonna with Child and Santi in the Contini Bonacossi Collection (Uffizi).
In 1447 he worked in the refectory of the Benedictine nuns at Sant'Apollonia in Florence, painting, in the lower part, a fresco of the Last Supper, accompanied above by other scenes portraying the Passion of Christ: Crucifixion, Entombment, and Resurrection, which are now damaged. This combination of scenes is not known to have been represented before. He also painted a lunette in the convent's cloister, depicting a Pietà. Many important Florentine families had daughters in the convent at Sant'Apollonia, so painting there likely brought Andrea to their attention.
The Last Supper displays Andrea del Castagno's talents at their best. The detail and naturalism of this fresco portray the ways in which he departed from earlier artistic styles. It is likely that Leonardo da Vinci was already familiar with this work before he painted his own Last Supper in a more dramatic form to contrast with the stillness of these works, so that more emotion would be displayed.
In 1449–1450 he painted the Assumption with Saints Julian and Miniato for the main altar (in the St. Julian Chapel) of the church of San Miniato fra le Torri in Florence (now in Berlin).
In the same years he collaborated with Filippo Carducci to paint a series of Illustrious People for the Villa Carducci at Legnaia. These include Pippo Spano, Farinata degli Uberti, Niccolò Acciaioli, Dante, Petrarca, Boccaccio, the Cumaean Sibyl, Esther and Tomiri.
Also from around 1450 is the Crucifixion in London, as well as the David with Goliath's Head and the Portrait of a Man, both in Washington.
Between January 1451 and September 1453 he completed the frescoes with Scenes of the Life of the Virgin left unfinished by Domenico Veneziano in the Florentine church of Sant'Egidio, Florence (now lost). In October Filippo Carducci commissioned him to paint frescoes for his villa at Soffiano, of which today an Eve and a ruined Madonna with Child survive.
In 1455 Andrea del Castagno worked in the Basilica della Santissima Annunziata (frescoes with the Trinity with Saints Jerome, Paula and Eustochium and St. Julian and the Redeemer, the former showing a stressed realism). Also in those years is attributed a Crucifixion for St. Apollonia. In 1456 he executed in the Florentine Cathedral the fresco of the Equestrian Statue of Niccolò da Tolentino, paralleling the similar painting by Paolo Uccello portraying John Hawkwood.
Giorgio Vasari, an artist and biographer of the Italian Renaissance, alleged that Castagno murdered Domenico Veneziano, but this is impossible, since Veneziano died in 1461, four years after Castagno died of the plague. It has been suggested that Vasari was confusing this murder case with another one involving a "Domenico di Matteo" who was killed by an "Andreino" in 1448, but the archival record shows that this is a misreading: "A cursory examination reveals two things: first, that the name of the dead painter is not Domenico di Matteo, but Domenico di Marco; and second, and much more crucially, that there is no mention of him having been killed by a painter named Andrea or Andreino."From the series of Illustrious People for the Villa Carducci
Assumption of the Virgin between San Miniato and St. Julian (1449–1450), Gemäldegalerie, Berlin