“Injustice like this isn’t new,” Mr. Obama went on to say. “What is new is that so much of your generation has woken up to the fact that the status quo needs fixing, that the old ways of doing things don’t work.”

In the face of a void in leader- ship, he said, it would be up to the graduates to shape the future.

“If the world’s going to get better, it’s going to be up to you,” he said.

It is a perilous time for HBCUs across the nation that have long struggled with less funding and smaller endowments than their predominantly white peers and are now dealing with the financial

challenges of the coronavirus. Even at the better-endowed HBCUs, officials are bracing for a tough few years.

Mr. Obama’s message to high school students came at the end of an hourlong television special featuring celebrities, including LeBron James, Alicia Keys, Yara Shahidi and Ben Platt, and was less sharp-edged than his speech to the college graduates. He urged the young graduates to be unafraid despite the current challenges facing the nation and to strive to be part of a diverse community.

“Leave behind all the old ways of thinking that divide us — sexism, racial prejudice, status, greed — and set the world on a different path,” Mr. Obama said.