"She knew he was a firefighter and she thought he would be able to help her," Assistant State's Attorney Amari Dawson said during a hearing Tuesday for Gary Swiercz, 49, a Chicago Ridge fire official.
Swiercz is accused of breaking into the unidentified woman's home Saturday, threatening her with a knife and slamming her head against the floor, prosecutors said.
He is charged with attempted murder, home invasion, aggravated unlawful restraint, aggravated attempted criminal sexual assault and residential burglary, the Chicago Tribune reported.
Prosecutors said he was wearing black makeup he applied around his eyes before the attack when police interviewed him, and he confessed to police, saying he realized during the alleged attack he was "a public servant and shouldn't be doing this."
Swiercz attorney Colleen McSweeney Moore called the incident "out of character" for the fire chief, and speculated in court a medication error could have played a role in the incident.
Swiercz retired from his position Monday after being put on leave, fire officials said.
Toddler uninjured after being knocked over by Obama family dog
Martin Bashir resigns from MSNBC over Sarah Palin comments