At the outbreak of World War I, Anslinger volunteered for service. Due to an eye injury he did not pass the physical exam to become an active duty soldier and instead worked in the Army Ordnance Department. In 1918 he became a second lieutenant in the Ordnance Reserve Corps. Anslinger soon joined the diplomatic corps of the State Department.
In the closing days of World War I, Anslinger was instructed to make contact with the Kaiser and his entourage to encourage the Kaiser not to abdicate the throne. Based in The Hague at the time, Anslinger traveled to Amerongen and contacted the Kaiser’s court counselor to relay the message and serve as an intermediary between the U.S. government and the Kaiser’s staff.
From 1921 to 1923 Anslinger worked as vice-consul (clerk) to the American commissioner to Berlin, located in Hamburg, Germany. According to Anslinger, Hamburg at the time was a worldwide distribution center for illicit drugs. It was his first exposure to the international problem of narcotics.
In 1923 Anslinger married Martha Denniston and adopted her 12-year-old son, Joseph.