The NYPD sergeant accused of raping an underage teenage girl has committed suicide, sources said.

Sgt. Joel Doseau, 43, was found dead with a plastic bag over his head inside his parents’ Canarsie home, sources said.

A hose attached to a nearby butane tank fed gas into the bag, asphyxiating the cop, sources said.

Doseau, who was assigned to the Brooklyn South command, was arrested Aug. 5 while on duty after the accuser, now in her 20s, came forward alleging the two had carried on an illicit relationship starting in 2008 when she was just 15, court records show.

The charges were laid by Brooklyn prosecutors the following day in a 40-count indictment, accusing the disgraced cop of engaging in various sex acts with the young girl.

Doseau apparently lied to the girl about his age when the relationship started, telling her he was younger than he actually was, sources said.

The indictment claims the pair had sex during the summers of 2008 and 2009 without the girl’s consent.