The former Baltimore mayor has been mentioned in political circles as presidential candidate material for 2016.

Before he took the podium, speakers included Gov. Maggie Hassan and U.S. Sen. Jeanne Shaheen, who took a playful jab at Republican Scott Brown, a former U.S. senator from Massachusetts. Brown, who owns a home in Rye, is considering a run against Shaheen for the New Hampshire senate seat in 2014.

"Let me say something nice about Scott Brown in case he decides to become a citizen of our state. He will give you the shirt off his back. and I've seen the photos to prove it," she said, referencing an underwear advertisement Brown posed for in his 20s.

Shaheen said Republicans will try to use the difficulties of the health care law's rollout "as their path to victory."

"Well let me tell you something, every American deserves affordable, quality health care," she said. A Republican alternative would be "a return to the same old, broken system we had before, and we are not going to let that happen."

U.S. Rep. Ann Kuster said the Affordable Health Care Act was "not a perfect bill," but vowed Democrats are "not going to turn our backs on the families who need health care."

Hassan said that, at the state level, accepting $2.5 billion in federal funds to expand Medicaid coverage would result in electoral success because it is the right thing to do and affects "real people with real lives."

O'Malley, who served as the chairman of the Democratic Governors Association in 2012, said "no win was any sweeter than helping Gov. Hassan win here in New Hampshire."

He praised President Barack Obama's leadership and had harsh words for the Tea Party, specifically Texas Sen. Ted Cruz, for "twisting the words of our Founders."

"What Senator Cruz doesn't understand is that the Patriots who founded New Hampshire and Maryland didn't pray for their President to fail, they prayed for him to succeed," O'Malley said.

He made reference to New Hampshire U.S. Sen. Kelly Ayotte, a Republican, being among those "trying to distance themselves from the Tea Party ever since they nearly drove our country into default."

After his speech, New Hampshire GOP Chairman Jennifer Horn issued a statement criticizing O'Malley's record. "By honoring a liberal, income-tax supporting extremist at their annual dinner, Democrats have proven that they are widely out of step with New Hampshire's fiscally responsible values," Horn said.