He defeated Mitt Romney, the former Massachusetts governor, despite having a far inferior campaign budget.
Obama received 37 per cent of support from Iowans, with Edwards pushing Clinton, who hopes to become the US's first female president, into third place.
Huckabee's winning margin was greater than Obama's, picking up 34 per cent support to Romney's 25 per cent.
The former actor Fred Thompson edged out John McCain, the Arizona senator, by 300 votes to take third place.
The victories give Obama and Huckabee a powerful boost for the five-week period ahead that will culminate in more than two dozen electoral contests on February 5.
In his speech to supporters, including an influx of new caucus-goers, Obama went on to say: "They said this day would never come. They said our sights were set too high...
"But on this January night, on this defining moment in history, you have done what the cynics said we couldn't do. You did what the state of New Hampshire can do in five days.
"We are choosing hope over fear, we are choosing unity over division and sending a powerful message that change is coming to America."
Clinton, the former first lady, was considered in some quarters the almost certain Democratic nominee, a few months ago."Today we are sending a clear message that we are going to have change, and that change will be a Democratic president in the White House," she said in Des Moines, with Bill Clinton, her husband and a former president, next to her.
Al Jazeera's Dave Marash in Des Moines said that the result will give Obama momentum, credibility and much more money to campaign and compete with Clinton in New Hampshire and during the next month leading up to Super Tuesday on February 5.
The Republican result was a slight blow for Romney who had a far greater campaign budget than Huckabee but a slight boost for McCain who has largely sacrificed canvassing in Iowa to concentrate on New Hampshire.
However, Marash reported that a controversial comment made by McCain on Thursday may yet undermine his campaign.
"He told a crowd in Derry, New Hampshire, that if the US had to stay in Iraq for 100 years that would be alright with him," Marash said.
"In the past, McCain's policy of backing a US troop surge was aimed at allowing for an earlier withdrawal. This incautious statement could come back to haunt the senator."
In the final hours before the caucuses on Thursday night, many candidates bought time on local television to drive home their message and encourage maximum voter turnout.
However Jack Burkman, a Republican strategist, says the results from Iowa give little indication of how the presidential race will unfold in the coming months.
"The political question in the US is what does that momentum mean going forward? I am sure it does not mean that much," he told Al Jazeera.
"The message for international audiences is that, this time round, the US primaries have changed in that you have virtually everything at stake on February 5.
"In the past, you had a much more staggered process so that Iowa and New Hampshire meant a lot more. What's going on in the US is the major TV networks are commercialising this for their own ends and profits."
The race now moves on to New Hampshire on January 5 but there will be two less candidates after the Democrats Chris Dood and Joseph Biden announced they were withdrawing.
|Huckabee was little known outside the state of Arkansas a few months ago [EPA]|