The ceremony at the White House took place nearly 100 years after the two were denied their medals, possibly because of discrimination.
Sgt William Shemin and Pte Henry Johnson both heroically saved comrades in WWI. The Medal of Honor is the US’s highest military honor.
Mr Obama said: “They both risked their lives to save the lives of others,” “It’s never too late to say thank you. We are grateful that you never gave up.”
Advocates for the two men urged Congress to change rules for Medal of Honor recipients that specified the “heroic actions” had to take place within a five-year time frame.
Jewish soldier Shemin’s daughter, Elsie Shemin-Roth, accepted the award on her father’s behalf.
She had worked for years to garner the documents outlining her father’s actions so he could qualify.
Ms Shemin-Roth, who is in her 80’s, began her campaign after learning about a US law that reviewed cases of Jews denied medals during World War Two. She fought for passage of a similar law for Jewish World War One veterans. Congress last year passed the exemption that would qualify her father, who died in 1973.
“This was anti-Semitism, no question about it,” Ms Shemin-Roth said. “Now a wrong has been made right and all is forgiven.”
Johnson’s supporters had been pushing for the Medal of Honor for decades. The Virginia native died in 1929.
When a collection of military records became available online, including a communique from WW1 General John Pershing describing Johnson’s actions that night of the German attack, his case gained steam.
New York National Guard Command Sgt Maj Louis Wilson accepted the award on Johnson’s behalf.
“We have to make sure all of our heroes’ stories are told,” said Mr Obama.
“America is the country we are today because of people like Henry and William. The least we can do is to say… we know who you are.”
Obama said: “America can’t change what happened to Henry Johnson,” “We can’t change what happened to too many soldiers like him, who went without celebrated because our nation judged them by the color of their skin and not the content of their character. But we can do our best to make it right.”