Madsen began his military career in 1859 and served in the
Second War of Schleswig of 1864 as a lieutenant. In 1896, at the rank of colonel, Madsen was responsible for the adoption of the
Madsen machine gun by the Danish army in 1902 and widely exported. He also constructed the
Madsen 20 mm anti-aircraft cannon. As
Minister of War in the
Cabinet of J. H. Deuntzer from 1901 to 1905, he supported the
Fortification of Copenhagen, which contributed to the conflict that led to the split of the
Venstre Reform Party as the left wing of the party left the party in protest to form the
Radikale Venstre. Madsen became a general in 1903 and was elected to the
Folketing in 1909. ==Personal life==