Werner was born in Frankfurt (Oder) in the Province of Brandenburg. He began painting in 1857 as a student painter, then studied painting at the Academy of the Arts in Berlin. He pursued his studies at Karlsruhe, where he studied under Johann Wilhelm Schirmer, Ludwig Des Coudres and Adolf Schroedter. After having won a travelling scholarship upon the exhibition of his early works, he visited Paris in 1867, and afterwards Italy, where he remained for some time. On his return, he received several state commissions.
On the outbreak of the Franco-Prussian War in 1870, Werner was sent with the staff of the third corps d'armee, and stayed in France until the close of the campaign in 1871. In that year, he married Malwine Schroedter, Adolph Schroedter's daughter. In 1873 he was appointed professor at the Berlin Academy. His career reached its peak when he became, in 1875, director of the Academy in Berlin. After 1888, while in William II's court, Werner tutored the emperor to become a painter. In 1909, he succeeded Hugo von Tschudi in to directing the Nationalgalerie in Berlin. He died in Berlin in 1915.