The 51-year-old man was released from his job after prosecutors began investigating the allegations.
The Chicago Tribune said further information, such as who made the allegations and when, had not been released.
The ex-officer had not been charged with any crime and was on paid leave for two months before deciding to retire, the report said.
During his career, the officer posed online as a child to lure and arrest sexual predators, the Tribune said.
"He was one of the most experienced, well-versed detectives we had doing that," said Wayne Hunter, chief deputy of the sheriff's office.
Hunter said the officer did not have any previous disciplinary issues and the recent allegation was the first accusation he had heard against the man.
Texas principal bans speaking Spanish, stirs controversy
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'