"The world is changing with accelerating speed. This presents opportunity, but also new dangers," Obama said in his address to the United States Military Academy at West Point in New York state.
"We know all too well, after 9/11, just how technology and globalisation has put power once reserved for states in the hands of the individual, raising the capacity of terrorists to do harm.
"Russia's aggression toward former Soviet states unnerves capitals in Europe, while China's economic rise and military reach worries its neighbours," he said.
"From Brazil to India, rising middle classes compete with our own, and governments seek a greater say in global forums.
"And even as developing nations embrace democracy and market economies, 24 hour news and pervasive social media makes it impossible to ignore sectarian conflicts, failing states and popular uprisings that might have received only passing notice a generation ago," Obama said.
"It will be your generation's task to respond to this new world. The question you will face is not whether America will lead, but how we will lead, not just to secure our peace and prosperity, but also to extend peace and prosperity around the globe," said the US President.
Obama stressed that US isolationism is not an option.
"It is absolutely true that in the 21st century, American isolationism is not an option. If nuclear materials are not secure, that could pose a danger in American cities," he said.
"As the Syrian civil war spills across borders, the capacity of battle-hardened groups to come after us increases.
Regional aggression that goes unchecked in southern Ukraine, the South China Sea, or anywhere else in the world will ultimately impact our allies, and could draw in our military.
"Beyond these narrow rationales, I believe we have a real stake in an abiding self-interest and in making sure our children grow up in a world where schoolgirls are not kidnapped; where individuals aren't slaughtered because of tribe or faith or political beliefs.
"I believe that a world of greater freedom and tolerance is not only a moral imperative, it also helps keep us safe," Obama said.