A Chicago Police detective acquitted in the 2012 fatal shooting of an unarmed woman ended his 22-year career in bitterness Tuesday, resigning just two days before a termination hearing was set to begin.

Dante Servin, 47, became a national lightning rod of criticism by civil-rights activists since last year when he was found not guilty of involuntary manslaughter in the death of 22-year-old Rekia Boyd.

In November, following months of protests over Servin keeping his job, then-Police Supt. Garry McCarthy asked the Chicago Police Board to fire him. An evidentiary hearing before the disciplinary board was scheduled for Thursday.

Servin’s attorney, Darren O’Brien, said his client doesn’t currently have a new job lined up.

“He decided enough is enough. Of course he is bitter. I am bitter,” O’Brien said.

Demonstrators have made Servin’s life miserable, repeatedly picketing his home, O’Brien said. On April 30, activist groups including Black Lives Matter briefly blocked traffic on Lake Shore Drive, using the NFL’s “Draft Town” to call attention to the Servin case and other instances of alleged police brutality.

“The current political climate made his termination a foregone conclusion,” O’Brien said, adding that Servin extended his condolences to Boyd’s family.

Servin can begin collecting his pension when he turns 50 in July 2018. His salary, as of Dec. 31, 2015, was $97,044 a year, according to city records.

Servin fatally shot Boyd and wounded her friend Antonio Cross, 39, after confronting them and others about a loud gathering close to Servin’s home near Douglas Park. In March 2013, the City Council approved a $4.5 million legal settlement with Boyd’s family.

The Chicago Sun-Times has reported that city attorneys didn’t interview the officer or other witnesses under oath before approving that deal — an unusual move in wrongful death cases.

Then, in a controversial ruling last April, a Cook County judge acquitted Servin of involuntary manslaughter, suggesting that prosecutors should instead have charged him with first-degree murder.

Last September, the Independent Police Review Authority, which investigates all shootings by police officers, recommended Servin’s firing. He committed several violations, including shooting Boyd by discharging his gun into a crowd, and failing to show he was qualified to use the gun through the police department, IPRA found.

Servin also made inconsistent statements about the incident to IPRA, Cook County prosecutors and Chicago Police detectives, according to IPRA.

In November, McCarthy released a statement saying he was seeking Servin’s firing for showing “incredibly poor judgment in his efforts to intervene in a low-level dispute while off-duty.”

According to investigators, Servin was driving in the alley next to his West Side home at about 1 a.m. on March 21, 2012, when he encountered two men and two women walking to a nearby store. After he asked them to quiet down, one of the men swore at him, and 3Cross said he waved Servin away, thinking he was trying to buy drugs.

Cross was carrying a cellphone, but Servin said Cross made a move toward his waistband and held up what appeared to be a gun. As Servin was turning his car in the opposite direction, he pointed his own gun across his body and fired at least five times. One of the shots hit Cross in the hand. Another hit Boyd in the head. She fell to the ground and later died.

Cross ran to the end of the alley and flagged down another police car that was responding to the shots, according to IPRA. Aside from Servin’s weapon — a Glock semiautomatic pistol he had failed to register — no other gun was found, and Cross maintained he was unarmed.