The Queens city councilman at the center of the Malcolm Smith corruption scandal was a lousy husband, too — throwing away his marriage for a co-ed staffer half his age, The Post has learned.

Dan Halloran, 41 — who is charged in a bribe scheme to get state state Sen. Smith into the mayoral race — repeatedly hooked up with Meaghan Mapes, then 21, in her Queens home between 2010 and 2011, sources said.

She served as his deputy chief of staff during that same period, earning $30,000.

The relationship was the final straw for Halloran’s wife, Cynthia, and the two were locked in divorce proceedings by early 2011.

“There’s no doubt about it, it broke them up,” said a political insider who knew of the affair.

Halloran slept over about twice a week in Mapes’ basement pad, according to a roommate. She was studying government and politics at St. John’s University.

Mapes, now a law student at the University of Virginia, did not return calls for comment about her relationship with Halloran.

She first worked for him in his 2009 City Council run, and was cut three $1,000 checks — which a source said “pissed everyone off.”

“What did she do?” the source asked. “What about the other campaign staff workers?”

Her former roommate said she started bringing him to the apartment around the summer of 2010.

Halloran would sneak in and out of the apartment using a side door, and the two were glued to the hip, the roommate said.

“He was dating someone who was in college . . . I don’t know how he pulled it off,” said the roommate. “He’s not attractive.

“He was constantly around. It was really annoying. Thank God he never came out with his shirt off.”

The roommate said Halloran was constantly bickering with Mapes.

“When he was dating my friend, he would do stupid, immature things to make her upset. He was an a–hole and a creep,” the roommate said. “She would tell us he was the member of some stupid religion.”

Halloran and his wife are practicing Theodists — a pagan religion where members drink from horns and play combat games while wearing medieval garb.

Cynthia Halloran refused to discuss her husband’s affair yesterday. Dan Halloran and his lawyer did not return calls.

The divorce has not been finalized, and the parties are due back in court in May.

The Queens Republican was charged last week along with Smith (D-Queens) and four others in a federal corruption sting.

Halloran was caught on wiretaps discussing bribes with city GOP bosses to get Smith on the Republican mayoral ballot, prosecutors said.