Then the pair, accompanied by former vice president Joe Biden and his wife Jill, watched the team win 28-6.
The Invictus Games - for injured servicemen and servicewomen - was set up by Prince Harry in 2014.
Image caption Toronto hosted the third Invictus Games - the first was held in 2014 in London
The prince was accompanied by US First Lady Melania Trump at the opening ceremony last week, while he also made his first public appearance with his girlfriend Meghan Markle.
Mr Obama has met Prince Harry a number of times - their first meeting was in the US in 2015, while they had dinner together at Kensington Palace in April 2016.
Prince Harry started the Invictus Games as a way of helping wounded service personnel and veterans with their physical and psychological rehabilitation.
Teams from 17 nations, made up of over 500 participants, have taken part during the week-long event in Canada.
More about: #Obama #PrinceHarry