Keith Appling warms up before the Orlando Magic's game against the Milwaukee Bucks on January 26, 2016 at BMO Harris Bradley Center in Milwaukee, Wisconsin.
CNN  — 

Former NBA player Keith Appling pleaded guilty to second degree murder and a firearm charge on Monday in relation to a fatal shooting in 2021 in Detroit.

Appling, who played for the Orlando Magic in 2016, pled guilty in a Michigan court to one count each of second-degree murder and weapons felony firearm possession.

The plea deal was announced just as his trial was set to begin on Monday.

The 31-year-old Appling had been charged in 2021 for the murder of 66-year-old Clyde Edmonds, to whom Appling was related.

According to prosecutors, Appling’s plea agreement calls for a sentence of 18 to 40 years in the Michigan Department of Corrections and two years consecutive sentencing for the felony firearm possession.

He will be sentenced by a Michigan judge on March 3rd.

“It has been clear that this man has been spiraling downward for some time. Many of those that tried to intervene with this defendant were hoping that he would get on the right track and stay there,” said County Prosecutor Kym Worthy said in 2021. “It is always tragic when one with so much promise, talent and possibility is alleged to have committed the most serious of crimes.”

On May 22, 2021, police officers were called to a house in Detroit because of a reported shooting where they found the victim on the front lawn with multiple gunshot wounds. Edmonds was taken to the hospital where he was later pronounced dead.

Prosecutors say that Appling had an argument with Edmonds over a handgun, after which Appling shot Edmonds multiple times before fleeing the scene.

It was alleged that Appling’s girlfriend Natalie Bannister drove Appling away from the crime and failed to tell the truth to officers investigating the case. In 2022, Bannister pled guilty to lying to a peace officer and was sentenced to 18 months’ probation.

Appling had a productive few years with the Michigan State Spartans, finishing among the college’s career leaders in starts, games played, free throws made, three-pointers attempted and points.

As well as playing for the Magic, he featured in the NBA’s developmental league, the G League, as well as playing for professional teams in Mexico and the Dominican Republic.

CNN has reached out to Appling’s lawyers for comment.