Rival Hillary Clinton, the former first lady who entered the race 17 months ago as a heavy favorite, did not concede and said she would consult with party leaders and supporters to determine her next move.
Obama will be crowned the Democratic nominee at the convention in August and will face McCain in November's election to choose a successor to President George W. Bush.
"Tonight, we mark the end of one historic journey with the beginning of another," Obama told a victory celebration in St. Paul, Minnesota, at the site of the Republican convention in September. "Tonight, I can stand before you and say that I will be the Democratic nominee for president of the United States," he told 17,000 cheering supporters. Another 15,000 gathered outside the arena.
Clinton told New York members of Congress she would be open to becoming Obama's vice presidential running mate, and her backers turned up the pressure on Obama to pick her as his No. 2.
The win by Obama, son of a black Kenyan father and white mother from Kansas, marked a milestone in U.S. history. It came 45 years after the height of the civil rights movement. It followed one of the closest and longest nomination fights in recent U.S. political history.
Clinton, who would have been the first woman nominee in U.S. political history, won more than 1,900 delegates. Obama clinched the win after a wave of more than 70 uncommitted delegates announced their support on Tuesday, pushing his total to 2,156, according to MSNBC count.
Five months of state-by-state delegate selection concluded on Tuesday with Obama winning Montana and Clinton capturing South Dakota.
More party leaders and uncommitted officials are expected to back Obama on Wednesday as the party tries to rally around the nominee for what promises to be a tough election campaign with McCain.
"I am committed to uniting our party so we can move forward stronger and more ready than ever to take back the White House in November," Clinton told a cheering crowd of supporters in New York City. But she made no public overtures to Obama.
The two are expected to meet soon to discuss the looming election campaign and Clinton's role.
No Meeting Scheduled
They talked early on Wednesday, and Obama spokesman Robert Gibbs said Obama told her he would like to "sit down when it makes sense for you." But no meeting was scheduled.
Both Obama and Clinton will address a pro-Israeli lobbying group on Wednesday morning in Washington as Obama begins to focus on the November election. McCain wrapped up the Republican nomination in March.
"This has been a long campaign and I will make no decisions tonight," Clinton said. "In the coming days I'll be consulting with supporters and party leaders to determine how to move forward with the best interests of our party and my country guiding my way." Obama lavished praise on Clinton after beating her.
"Senator Hillary Clinton has made history in this campaign not just because she's a woman who has done what no woman has done before, but because she's a leader who inspires millions of Americans," he said.
"Our party and our country are better off because of her, and I am a better candidate for having had the honor to compete with Hillary Rodham Clinton," he said.
McCain kicked off his race against Obama with a rally in Louisiana where he sought to distance himself from Bush and questioned Obama's judgment. He called Obama a "formidable" opponent but one who had not shown a willingness to put aside partisan interests.
"He is an impressive man, who makes a great first impression," McCain, 71, a former Vietnam prisoner of war, said of Obama. "But he hasn't been willing to make the tough calls, to challenge his party, to risk criticism from his supporters to bring real change to Washington. I have."
Obama questioned the extent of McCain's independence and tried to link him to Bush. "While John McCain can legitimately tout moments of independence from his party in the past, such independence has not been the hallmark of his presidential campaign," he said.
"There are many words to describe John McCain's attempt to pass off his embrace of George Bush's policies as bipartisan and new. But change is not one of them." Obama, 46, is serving his first term in the U.S. Senate from Illinois and would be the fifth-youngest president in history.
He was an Illinois state senator when he burst on the national scene with a well received keynote speech at the 2004 Democratic convention.
His grueling battle with Clinton split the party, with blacks, young people and more educated and higher-income voters backing Obama, while Hispanics, older voters and white working-class voters backed Clinton.