Born in Ins as the son of Veterinarian Samuel Anker (then a member of the constituent assembly of the Canton of Bern), Anker attended school in Neuchâtel, where he and Auguste Bachelin, later a fellow Artist, took early drawing lessons with Louis Wallinger in 1845–48. In 1849–51, he attended the Gymnasium Kirchenfeld in Bern, graduating with the Matura. Afterwards, he studied theology, beginning in 1851 in Bern and continuing at the university of Halle, Germany. But in Germany he was inspired by the great art collections, and in 1854 he convinced his father to agree to an artistic career. In Neuchâtel he got his name Albert, because it was much easier to pronounce for his French speaking classmates.
Anker moved to Paris, where he studied with Charles Gleyre and attended the École nationale supérieure des Beaux-Arts in 1855–60. He installed a studio in the attic of his parents' house and participated regularly in exhibitions in Switzerland and in Paris. Anker married Anna Rüfli in 1864, and they had six children together; the four children who did not die at an early age – Louise, Marie, Maurice and Cécile – appear in some of Anker's paintings. In 1866, he was awarded a gold medal at the Paris Salon for Schlafendes Mädchen im Walde (1865) und Schreibunterricht (1865); in 1878 he was made a knight of the Légion d'honneur. In 1870–74 he was a member of the Grand Council of Bern, where he advocated the construction of the Kunstmuseum Bern.
Apart from his regular Wintertime stays in Paris, Anker frequently travelled to Italy and other European countries. In 1889–93 and 1895–98 he was a member of the Swiss Federal Art Commission and in 1900 he received an honorary doctorate from the University of Bern. A stroke in 1901 reduced his ability to work. Only after his death in 1910 was there a first exposition dedicated to him, held at the Musée d'art et d'histoire in Neuchâtel.
Many Swiss postage stamps and other media have incorporated Anker's work. His studio in Ins has been preserved as a museum by the Albert Anker Foundation. One of Anker's greatest admirers and Collectors is former Swiss Federal Councillor Christoph Blocher, since the 1980s Switzerland's most influential conservative Politician, who also published an apologetic essay on Anker.
Albert Anker's work made him Switzerland's most popular genre Painter of the 19th century, and his paintings have continued to enjoy a great popularity due to their general accessibility. Indeed, as a student, Anker summed up his approach to art as follows: "One has to shape an idea in one's imagination, and then one has to make that idea accessible to the people."