The German national anthem in 1914 was Heil dir im Siegerkranz, an ode to the Kaiser sung to the same tune as God Save the King.
The piece you're thinking of, the Deutschlandlied, was written in the 1840's as a plea for Germans to put national unification above everything else.
The Deutschlandlied was the popular if unofficial anthem of Germany for decades from the 1840s on. As a Prussian concoction, Heil dir im Siegerkranz was never especially favored by the German public and was never the official German imperial anthem.