He was born in Opdal. His parents were peasants, but Rasmus Hansen studied law in Denmark. He settled in Skogn and worked as an attorney. While living here, he was a elected to the Norwegian Parliament in 1839, 1842 and 1848, representing the rural constituency of Nordre Trondhjems Amt.
Around 1850 he moved from Skogn to become district stipendiary magistrate (sorenskriver) in Northern Gudbrandsdalen. He died there in the 1860s.