A nutty professor who teaches city cops and firefighters how to cool down heated situations assaulted her ex-cop boyfriend because he allegedly cheated on her, police sources said.

Joann Baney, 54, who teaches International and Public Affairs at Columbia University, was arrested Valentine’s Day, at 10:45 p.m., after she slugged retired NYPD sergeant Walter Frey,46, while he was sleeping, according to a criminal court complaint.

“I hit him because he cheated on me,” she allegedly said at the scene while she was being arrested, the documents reveal.

Frey suffered lacerations to his left ear, right side of his neck, bleeding and redness, the documents show.

The Ivy League professor is the director of the FDNY Officers Management Institute and a faculty member of the NYPD’s Police Management Institute, according to her bio on the Columbia University website and her LinkedIn page.

Baney was slapped with misdemeanor assault charges, attempted assault and harassment, the documents reveal.

Frey, who retired in 2011, was once arrested for allegedly making harassing phone calls to a Suffolk County woman and was charged with aggravated harassment in December 2002, police sources said.

Baney was released on her own recognizance after arraignment and is due back in court on February 27.

Baney uploaded a video to YouTube in 2013 which stars her partner Frey. He appears at the 1:28 mark.