Educated at the Industrieschule in Zürich, but then expelled in a political mix-up, Keller had to find work when he was 15. He became an apprentice in 1834 to the landscape-painter Steiger and in 1837 to the water-colourist Rudolf Meyer (1803-1857); then studied art for a time at the Royal Academy of Fine Arts in Munich (Bavaria).
Keller returned to Zürich in 1842 and, although possessing artistic talent, took up writing. He published his first poems, Gedichte, in 1846. From 1848 to 1850 he studied at the University of Heidelberg, and from 1850 to 1855 worked in Berlin. In 1855, he published a semi-autobiographical novel, Green Henry, drawing on his youth and career (or more precisely non-career) as a painter up to 1842. With this novel he won genuine acclaim. He returned again to Zürich and became the First Official Secretary of the Canton of Zürich (Erster Zürcher Staatsschreiber) in 1861. In 1872 he published Seven Legends (Sieben Legenden), which dealt with the early Christian era. He retired from his cantonal post in 1876 in order to continue his writing.
A master story-teller, Keller wrote some of the best-known German-language short-stories of the late 19th century. His works include The People of Seldwyla (Die Leute von Seldwyla) (1856-1874), which (includes the story "A Village Romeo and Juliet" (Romeo und Julia auf dem Dorfe), the basis of the Delius opera A Village Romeo and Juliet); Zurich Novellas (Züricher Novellen) (1877); Collected Poetry (Gesammelte Gedichte) (1883), and the novel Martin Salander (1886).