President Barack Obama at the memorial service for Nelson Mandela in Johannesburg in 2013. In July, Mr. Obama will return to deliver a lecture to commemorate the 100th anniversary of Mandela’s birth.

WASHINGTON — He’s been photographed kite-surfing with Richard Branson off Necker Island, relaxing on David Geffen’s yacht in French Polynesia with Bruce Springsteen and Oprah Winfrey, river-rafting with his family in Bali and posing with a celebrity chef in Tuscany.

To those who have paid only casual attention to former President Barack Obama’s foreign travels since he left the White House in January 2017, it can seem as if Mr. Obama has been on an extended vacation of the kind only the very rich can afford.

But the former president has also met quietly with groups of young people in New Zealand, Brazil, Indonesia and Singapore, as well as paying calls on foreign leaders, including Xi Jinping of China, Emmanuel Macron of France, Justin Trudeau of Canada and Malcolm Turnbull of Australia.

Now, Mr. Obama is inaugurating his most significant international project as an ex-president, with an announcement on Monday that the Obama Foundation plans to convene 200 young people this July in Johannesburg for five days of meetings, workshops and technical training.

At the same time, Mr. Obama will deliver a lecture to commemorate the 100th anniversary of the birth of Nelson Mandela, whom he eulogized after his death five years ago by saying he “makes me want to be a better man.”

The choice of Mandela and South Africa are freighted with symbolism for Mr. Obama at a time when his political legacy is being dismantled by his successor, President Trump, who crudely disparaged African countries and complained about laws that would protect immigrants from those places.

Mr. Obama speaking at the University of Cape Town in 2013. Mr. Obama is inaugurating his most significant international project as an ex-president, with an announcement that the Obama Foundation plans to convene 200 young people in July in Johannesburg for five days of meetings, workshops and technical training.

“It gives him an opportunity to lift up a message of tolerance, inclusivity and democracy at a time when there are obviously challenges to Mandela’s legacy around the world,” said Benjamin J. Rhodes, a former speechwriter for Mr. Obama who still advises him.

“Mandela,” he added, “endured far darker times than anything we’re enduring today.”

Mr. Obama does not plan to take on Mr. Trump directly, in keeping with his practice of not publicly…