Born out of wedlock, Carl Hansen was raised in poor circustances by his long-widiwed mother as an "adopted" child. After his apprenticeship as a brazier, he travelled for four years as a journeyman through Germany, Austria, Italy, France and Switzerland. For more than a year he lived in Berlin and was introduced to its large homosexual subculture through a love affair with a male prostitute.
In 1895, after doing military service, he became a constable in the Copenhagen Police Department. Under the pen name of Albert Hansenhe published an article in Magnus Hirshfeld's journal in which he undertook to prove that the fairy-tale author Hans Christian Andersen had been a homosexual. As a police officer Hansen was responsible for the introduction of the finger-printing method.
In 1897-1903 he lived together with Hjalmar Sørensen. In 1906 he was appointed police inspector and deputy commander of the Copenhagen CID. The same year he was implicated in a large homosexual scandal. After having been in custody for ten months, he suffered a nervous breakdown and was transferred to the psychiatric ward.
Immediately after being released he mounted a ferocious attack on the judge in a series of newspaper articles. As a result, the key witness against him changed his testimony and thereby saved Hansen from being convicted for sodomy but not from being sentenced to two months of prison for gross indecency with minors.
In 1907 Hansen emigrated to the US, where went to Arkansas with Conrad Peter Jensen and they bought a farm where they lived until Hansen was ruined in the Depression of 1929. He returned to Denmark in 1934. At a police parade the chief of police introduced him to younger colleagues as an early pioneer of criminal investigation and he received a small pension.
In two autobiographical novels (published in 1937 and 1939), Hanson told the tale of his own childhood, of his years of traveling journeyman, and of his time in Berlin - the first coming-out novels in Danish literature. He planned to write a third novel on his career as a police officer, which he had come to see as a kind of treason against his own class, but in 1939 he took his own life.