At least 200,000 people heard Mr Obama make the only public speech of the Democratic Party candidate's world tour.
His words were broadcast live in Germany, where he is a popular figure.
Mr Obama began by paying tribute to the Berliners who held out against Soviet pressure during the blockade in 1948.
Appealing for a renewed partnership with Europe, he identified terrorism, nuclear proliferation, trade barriers and climate change as global challenges.
Mr Obama's appearance had the air of a rock concert in the Tiergarten Park, a place that has become associated with huge feel-good football parties in recent years, the BBC's James Coomarasamy reports.
His rhetorical flights and unusual background have captured the imagination of a country which views its own politicians as rather dour and grey, our correspondent says.
"While the 20th Century taught us that we share a common destiny, the 21st has revealed a world more intertwined than at any time in human history," Mr Obama said.
Thousands turned out for the speech
"In Europe, the view that America is part of what has gone wrong in our world, rather than a force to help make it right, has become all too common," he continued.
"In America, there are voices that deride and deny the importance of Europe's role in our security and our future.
"But the burdens of global citizenship continue to bind us together," he added.
He said that partnership and co-operation among nations was "not a choice".
"It is the one way, the only way, to protect our common security and advance our common humanity," he argued.
He spoke on Afghanistan, a sensitive issue in Germany because of pressure for it to send more troops.
Mr Obama said it was time to renew nations' resolve to "rout the terrorists who threaten our security in Afghanistan and the traffickers who sell drugs on your streets".
"The Afghan people need our troops and your troops... we have too much at stake to turn back now," he said.
Mr Obama addressed many issues in his speech:
He said it was time to "defeat terror and dry up the well of extremism that supports it", arguing that Islamic extremism could be defeated just as communism had been in its time
He urged support for the Iraqis rebuilding their lives as the US passes responsibility to the Iraqi government and "finally brings this war to a close"
It was the moment, he said, to "renew the goal of a world without nuclear weapons" and not "stand idly by and watch the further spread of the deadly atom"
He urged all countries to act with "the same seriousness of purpose" as Germany to reduce carbon emissions
He called for global trade "that is free and fair for all"
Mr Obama's visit to Berlin kicked off the European leg of his world tour ahead of November's US presidential election.
One McCain supporter could be seen spreading the message in Berlin
Earlier, he met German leaders including Chancellor Angela Merkel.
Mr Obama flew to Germany after visiting Afghanistan, Iraq, Israel, the West Bank and Jordan, and is due to visit France on Friday, before heading to the UK.
Most Germans seem to believe that an Obama victory in November would do much to improve relations between the US and Europe, our correspondent says.
This speech is being compared to those made in Berlin by John F Kennedy and Ronald Reagan - but they were sitting presidents.
For Mr Obama to become president himself, this event - and the tour of which it is part - must be seen in a positive light by the voters back home in America, our correspondent says.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.