"Let us begin this hard work together. Let us transform this nation," he told a cheering crowd who had gathered in sub-zero temperatures.
Terming his campaign an "improbable quest," Obama pledged to end the cynicism in prevalent US politics after the Iraq war and years of hostility between Republicans and Democrats.
Obama, an early opponent of the war, has called for a phased withdrawal of troops starting in May.
He opposes the plan of George Bush, the US president, to send more troops to Iraq.
"America, it's time to start bringing our troops home," Obama said.
"Letting the Iraqis know that we will not be there forever is our last, best hope to pressure the Sunni and Shia to come to the table and find peace."
But after only two years in the senate, he admitted some may view his campaign as too much, too soon.
"I recognise there is a certain presumptuousness - a certain audacity - to this announcement," he said.
"I know I haven't spent a lot of time learning the ways of Washington. But I've been there long enough to know that the ways of Washington must change."
Adopting the classic "outsider" position of US presidential challengers, Obama said he was not in the race "just to hold an office, but to gather with you to transform a nation".
The rising party star and the only black US senator said the US had overcome many difficult challenges, from gaining its independence to the Civil War to the Great Depression.
Obama said: "Each and every time, a new generation has risen up and done what's needed to be done.
Today we are called once more - and it is time for our generation to answer that call."
He said a fresh perspective could break through Washington gridlock on issues like energy, health care and the Iraq war.
|"Letting the Iraqis know that we will not be there forever is our last, best hope to pressure the Sunni and Shia to come to the table and find peace"|
"What's stopped us from meeting these challenges is not the absence of sound policies and sensible plans. What's stopped us is the failure of leadership, the smallness of our politics - the ease with which we're distracted by the petty and trivial."
He said the last six years under Republican leadership in Washington had led to mounting debts, rising health care costs, economic anxiety and a botched foreign policy and war in Iraq.
Obama's political rise has been astonishingly fast.
He gave the keynote address at the 2004 Democratic convention before he was even elected to the US senate, and he has authored two best-selling books and appeared on numerous magazine covers.
The son of a white mother from Kansas and a black father from Kenya, he was the first black editor of the Harvard Law Review and served eight years in the Illinois legislature in Springfield before going to Washington.
Obama will follow up his announcement with a three-day campaign swing to the early voting states of Iowa and New Hampshire and his hometown of Chicago.