De Albertis worked in the studios of the history painters Domenico and Gerolamo Induno and Roberto Focosi while studying at the Brera Academy. His participation in the Brera exhibitions with works of social commitment on historical subjects was initially irregular because of his involvement as a volunteer in the nationalistic uprisings and wars of independence. In 1848, after taking part in the Milanese insurrection known as Le Cinque Giornate, he left the city to participate in the First War of Independence. Back in Milan, his work from 1855 focused on the military and patriotic genre, but also on historical painting and portraits.
At the outbreak of the second war of independence in 1859, he enlisted in Garibaldi's Cacciatori delle Alpi, in the department of the horse guards. Admitted to hospital, for the onset of freezing at his feet, he still managed to participate in the Spedizione dei Mille in Sicily.
Back in Milan again, De Albertis resumed taking part in the Brera exhibitions and, in 1860, he joined the Società de la Confusion with Tranquillo Cremona and Eleuterio Pagliano, as part of the Scapigliatura movement; the group will then be institutionalized in 1875 as the Circolo degli Artisti. The cultural climate gravitating around the Scapigliatura was the background to the artist’s first watercolours and works of a less committed nature depicting events and aspects of contemporary life, including the celebrated horse-racing scenes. In this way his client relationship with the Milanese aristocracy and upper middle class became very close. Prince Umberto di Savoia himself is among the subjects portrayed and will become his client.
The premature death of his only son in 1874 was followed by a return to painting of a patriotic character and marked social commitment.
The recipient of numerous official awards, De Albertis was appointed a member of the committee for the creation of Milan’s Museo del Risorgimento in 1884, together with Cesare Correnti, Giuseppe Missori and Gerolamo Induno. Although he did not hold a proper school of painting, he was the recognized teacher of Emilio Gola.