He was the son of Carl Christian Hansen [da], a pastry chef who became an amateur daguerrotypist.
In 1851, Hansen began to study painting at the Royal Danish Academy of Fine Arts, where he was awarded silver medals in 1956 and 1857.
By the time he graduated, his father had opened a small photographic studio (1854), with the help of older brother Georg, but he decided to continue pursuing a career as a painter.
In 1865, he was awarded the Neuhausenske Prize [da] for a scene depicting Lieutenant Johan Anker and his heroic actions during the Battle of Dybbøl.
That same year, they received a Royal warrant of appointment as official court photographers.