Hours after informing personnel to loud cheers at Bagram Airbase that "America's war in Afghanistan will come to a responsible end" with the withdrawal of US troops, the president was embroiled in a row over the accidental release of the name of a key security official in an email.
He led the remembering its war heroes, the fallen and those still defending the flag, in a Memorial Day tribute at Arlington National Cemetery in Virginia. He also carried out the presidential tradition of laying a wreath at the Tomb of the Unknown Soldier, where he was joined by first lady Michelle, vice president Joe Biden and Mr Biden's wife, Jill.
However, President Obama's administration faced severe criticism after it let out the name of the CIA's top official in Afghanistan in an email circulated to thousands of journalists during the trip to Bagram. The name of the officer - identified as "chief of station" in Kabul - was included by US embassy staff on a list of 15 senior US officials who spoke to the president during his visit.
The list was sent to a reporter who was representing the news media, who then sent it out to the White House press pool list, which contains up to 6,000 recipients.
The officer's name is being withheld at the request of the Obama administration, who said its publication could put his life and those of his family members in danger. But it was widely available on the internet.