"You were sometimes blamed for the misdeeds of a few," Obama said. "You came home and were sometimes denigrated when you should have been celebrated. It was a national shame, a disgrace that should have never happened."
Marking Memorial Day at both the Vietnam War Memorial and earlier at Arlington National Cemetery across the Potomac River from the capital, Obama noted that for the first time in nine years, "Americans are not fighting and dying in Iraq," and the nation was winding down its role in the conflict in Afghanistan.
"After a decade under the dark cloud of war, we can see the light of the new day on the horizon," Obama said to an audience gathered at the Arlington amphitheater lined with American flags under a warm, brilliant sun.
In this election year, Obama said the nation must remain committed to providing for the families of fallen soldiers and help returning service members seeking a job, higher education or health care benefits.
"As long as I'm president, we will make sure you and your loved ones will receive the benefits you've earned and the respect you deserve," Obama said. "America will be there for you."
Obama said sending troops into harm's way was "the most wrenching decision that I have to make. And I can promise you I will never do so unless it's absolutely necessary."
At the Vietnam War Memorial, Obama said of the veterans of that war served with "just as much patriotism and honor as any before you."
"When you came home, I know many of you put your medals away," he said. "You didn't talk too much about your service. As a consequence, the nation didn't always appreciate the chapter that came next." He said that although many Americans turned their back on Vietnam veterans, "you never turned your back on America."
As he seeks re-election, Obama has reminded audiences about the end of the war in Iraq and the move to bring all troops home from Afghanistan by 2014. And in a campaign ad released last week, he credits U.S. servicemen who helped in the raid that killed Osama bin Laden.
Republican presidential candidate Mitt Romney, meantime, promised to maintain an American military "with no comparable power anywhere in the world."
The presumptive Republican presidential nominee appeared with Sen. John McCain of Arizona, the GOP's 2008 presidential candidate, before a crowd in San Diego crowd estimated at 5,000 in what was billed as a Memorial Day service, not a campaign event. But Romney nevertheless drew clear contrasts with Obama. The former Massachusetts governor warned against shrinking America's military in Europe's image and said the nation must have the world's strongest military to win wars and prevent them.
A Bureau of Labor Statistics report in March found that 12.1 percent of U.S. Armed Forces veterans who served on active duty after September 2001 were unemployed in 2011. The unemployment rate for all veterans was 8.3 percent.
Veterans could play a significant role in the 2012 election. Exit polls in 2008 showed that Obama was supported by about 44 percent of voters who said they served in the military, while 54 percent voted for McCain, a former Navy pilot who was a prisoner of war for more than five years during the Vietnam War.
A poll released Monday by Gallup found that 58 percent of veterans support Romney and 34 percent back Obama. The results were based on a sample of 3,327 veterans who are registered voters and had a margin of error of 2 percentage points.
Several closely watched states in the election have large blocs of military voters. Florida, home to several military installations, has more than 1.6 million veterans, according to the Veterans Administration. Pennsylvania has nearly 1 million veterans, while Virginia and North Carolina each have about 800,000 veterans living in their states.
The president and first lady Michelle Obama started the day with a breakfast at the White House for families who have lost loved ones in combat.