Wagner was left out of Joachim Low's provisional 27-man squad on Tuesday for the tournament in Russia .
The 30-year-old has scored five goals in eight internationals, while he netted eight times in 14 Bundesliga appearances for Bayern this season.
Wagner, who was part of Germany's Confederations Cup-winning squad last year, said he was quitting internationals.
"I hereby resign immediately from the national team," he told Bild .
"For me, it is clear that I don't seem to fit with the coaching team with my way – always open, honest and direct to address things."
Mario Gomez, Thomas Muller, Marco Reus, Leroy Sane, Timo Werner and the uncapped Nils Petersen were the attackers named in Low's squad.
"I wish my boys only the best in Russia and hope they come back as world champions," he said.