He studied with Johan Peter Emilius Hartmann; his works include songs, choral and orchestral pieces as well as light operas.
In several of his song compositions Hansen revealed an uncommon sense of choral movement and considerable melodic vein, sometimes used fresh and cheerfully, sometimes on a quiet, slightly melancholic way.
[2] On 30 December 1836 in Gjentofte he married Marie Emilie Augusta Bugge (d. 1882) and therefore had to work for his living as music teacher, until 1845 when he was appointed organist at the Garrison Church in Copenhagen, position which he exchanged in 1851.
[1] Also several of his songs were written for the Student Choral Society, like He swinged on the Sea in 1835, Beautiful sound and Now green woods again, both in 1847, Little Karen and Do you remember the harvest in 1853.
His larger compositions are the arms song of The corsair and his bride written in 1862, his Mourning Cantate of Frederik VII written over Christian Richardt's Long was the struggle and strive text, In distress and danger, At the Masonic Logens Consecration, and One day in spring for solo, chorus and orchestra, performed at the Music Society after his death.