His remarks were taken by many as relating to Germany's unpopular mission in Afghanistan, although his office later said that he was referring to anti-piracy patrols off the coast of Somalia.
Koehler's resignation is likely to cause further problems for Angela Merkel, the German chancellor, who is already facing a euro zone debt crisis, sinking popularity and an increasingly awkward coalition partner.
Search for successor
Koehler, 67, a former head of the International Monetary Fund, had spoken out on the debt crisis enveloping the euro zone.
Now she will have to find a new and successful candidate for president.
Merkel's conservatives had backed Koehler, who was a year into his second term, for re-election by a special assembly last year.
Discussing Koehler's resignation, Thomas Kielinger, London correspondent of the German newspaper Die Welt, told Al Jazeera it "adds to the instability that we have in many areas of the political culture in my country.
"Does it add to the embarrassment of Merkel? Only to the degree that he is a member of the CDU, and he was given the job of president after a finally balanced poll five years ago, which said it was the time for a member of the conservative party to be president".
The role of president is largely symbolic, but the row leading to Koehler's resignation underscores the sensitivity of military issues in Germany even 65 years after the end of the second world war.
"We had a hard time rationalising and defending the deployment of German troops because my country, after the Hitler experience, has become largely a pacifist nation," Kielinger, the Die Welt journalist, said.
"It's not certain whether the conservative party is entitled to find a replacement. [The resignation] throws the possibility of who might succeed Koehler wide open. It's totally unpredictable."
A new German president must be elected within 30 days.
A special Federal Assembly, made up of all the members of parliament and an equal number of delegates sent by the 16 state assemblies, elects German presidents.