Prince Harry says he hopes to expand the Invictus Games in the future, saying the "sky's the limit".
He launched the Paralympic-style competition for injured servicemen and servicewomen and veterans in 2014.
The prince was joined at the closing ceremony by his girlfriend Meghan Markle, and her mother Doria Radlan.
He made a speech, watched by the participants from the 17 nations who have taken part during the week-long event in the Canadian city of Toronto.
Canada has hosted over 500 participants at the third edition of the Invictus Games - the first was held in 2014 in London
Prince Harry, in an interview with the host broadcaster, said: "We have a social responsibility to continue this for a long as it's needed."
Bruce Springsteen, Bryan Adams and Kelly Clarkson were among the acts to perform at the closing ceremony.
Former US president Barack Obama made a surprise appearance at the Games on Friday, while US First Lady Melania Trump accompanied Prince Harry at last week's opening ceremony.
And at the closing ceremony, Sophie Gregoire Trudeau, wife of Canadian prime minister Justin Trudeau, handed out participation medals to the competitors.
In a rousing send-off to all who competed at the third Invictus Games, Prince Harry addressed them directly in his closing speech, saying: "Right now you're on a high. At the summit of a mountain many of you thought was too high to climb. You have done it.
"This is the moment, right here, right now, shoulder to shoulder, you are Invictus."