Edward Brown, 26, entered the guilty plea during a Cook County Circuit Court hearing in exchange for a one-year prison sentence.
Prosecutors said Brown found a gun in an alley on Dec. 17, 2018 and took it to nearby train tracks to test it. The gunfire drew Officers Conrad Gary, 31, and Eduardo Marmolejo, 36, to the tracks to investigate, where they were struck by a passing commuter train.
"There is no sentence or judgment I can give that will bring those two men back to their families or fellow officers," Judge Diana Kenworthy said in a shaky voice.
Kenworthy paused to compose herself before noting Brown had no criminal record and cooperated with investigators and didn't violate terms imposed while free before trial.
"I understand that the sentence may not seem appropriate to some, but I accept that," the judge said from the bench. With credit for good behavior, Brown could be released this fall.
RELATED: Train operator audio from night CPD officers killed on Metra tracks released
Maria Marmolejo gave a victim-impact statement before Brown's sentencing, saying his biggest mistake wasn't a mistake, but a choice he made.
"Bad and illegal choices that resulted in an unimaginable reality, in the death of two men that were in search of the man doing something wrong, because it was their oath and they were doing the best they could at their jobs," she said.
Brown was given a chance to address the court, but declined.
RELATED: 2 Chicago cops killed by train on South Side ID'd, were chasing shooting suspect, police say
Assistant State's Attorney Andrew Varga told the court the gun and a firearm owner's identification card was in a fanny pack that a resident accidently left behind while dumping garbage. Brown was headed home from work when he found the fanny pack and walked to a commuter rail station where he fired the gun.
Marmolejo, Gary and several other officers responded to a report of shots fired, climbing up an embankment to the tracks, where they saw Brown and tried to follow him, according to Varga. The officers were trying to avoid a train approaching them and were unaware a train was approaching them from behind.
Defense attorney Frank Kostouros said little Wednesday, but at a previous hearing said Brown was devastated by the officers' deaths.
The video in the player above is from an earlier report.