The pair were removed from the lineup for North Korea's goalless draw with Colombia in Bochum on Wednesday, but after the Group C game, the remaining 19 players in the squad were all tested by the sport's governing body FIFA.
"This is a unique event at the World Cup, but if there are two positive samples in a team it means we have to investigate," said Dr. Jiri Dvorak, FIFA's chief medical officer. "This is a very sad day."
The pair have been provisionally suspended and their B samples have been sent for testing by FIFA.
According to news agency SID, the North Korean team left Germany early on Thursday morning having been eliminated after the group stages.
Theo Zwanziger, president of the German Football Federation (DFB) was scathing in his criticism of the North Koreans.
"This incident underlines the impression of the inhumane system in North Korea where attempts are made to give athletes success by any means possible," he said. "Success which can then be used for government propaganda."
But Zwanziger acknowledged FIFA's testing methods are catching athletes who use steroids.
"It is a positive that FIFA'S testing procedures seem to be working in the fight against doping," he said.
The two North Korean players were tested after the first two games against the United States and Sweden.
Their samples were examined at the World Anti-Doping Agency laboratory in Kreischa, east Germany, and then at the German Sport University in Cologne.
In total, there have now been three failed doping tests at the World Cup after Colombian player Yineth Varon failed an out-of-competition test in in Leverkusen on 25 June.