The midday event saw Harry join Dame Katherine Grainger, chair of UK Sport, and former England rugby player Jason Robinson to draw the group teams for the men's, women's and wheelchair tournaments.
Prior to the televised draw, the Duke met with children from a local school, as well as representatives from the 21 nations participating in the tournament -- which kicks off on October 23, 2021.
Dressed in a suit and tie, Harry smiled and shook hands with the youngsters, who gave a rugby demonstration on the palace lawn.
According to the PA news agency, Harry joked with the children about how some had been more active than others. "Some of you are really warm... Some of you haven't been running around," he said.
"Look after the grass though yeah? Otherwise I'll get in trouble," he joked, PA reported.
Prior to the draw, Harry said that the impact sport has had on both him and others -- especially young people -- is "remarkable."
"Not only do I continue to see sport actually changing lives, but it's saving lives as well," he added.
The Duke of Sussex has been Patron of the Rugby Football League since December 2016 when he inherited the role from the Queen.
Buckingham Palace said in a statement ahead of the event: "The Duke of Sussex has always strongly believed in the role of sport to bring communities together and change people's lives.
"Rugby League World Cup 2021 is keen to ensure a real social impact from the three tournaments, focusing on communities across some of the most deprived areas in England."
Ahead of his appearance, The Duke of Sussex voiced his support for the launch of the Rugby League Mental Fitness Charter, which aims to provide training for players, match officials and volunteers to look after their mental health, the Rugby League said Thursday.
She has spent recent days in Canada with baby Archie, while the royal family has attempted to deal with the ongoing crisis.
Harry attended crunch talks with the Queen and other members of the family on Monday.
The Invictus Games are a multi-sport event specifically held for wounded or disabled veterans to participate in.
Harry -- who spent a decade in the UK armed forces -- said in a message posted on Instagram: "I hope everyone in Germany is ready for what will be an incredible week of sport! I have no doubt that the German public will get right behind these Games and that every single competitor can expect a warm welcome and an amazing atmosphere."