A Chicago firefighter under investigation for his role in a racially charged melee that led to the fatal shooting of an African-American man by police in 2016 has taken his own life.

Ryne Kinsella, 28, shot himself in the head Wednesday at his home in the 11100 block of South Christiana in Mount Greenwood, according to the Cook County medical examiner’s office, which ruled his death a suicide. Kinsella left a note, sources told the Chicago Sun-Times.

Kinsella, who was a Chicago police officer before joining the Chicago Fire Department, was pronounced dead at the home at 10:16 p.m., according to the medical examiner’s office.

He had been a subject of investigations by the fire department’s Internal Affairs Division and the city’s Office of Inspector General. The internal fire department investigation was dropped when the inspector general stepped in, and that agency’s investigation continues, sources said.

A spokeswoman for Inspector General Joseph Ferguson would not comment. Fire department spokesman Larry Langford confirmed fire officials no longer were investigating Kinsella at the time of his death.

On social media Thursday, friends remembered Kinsella as “a great friend” who “will always be missed and remembered by many.” One woman wrote, “No one could help you slay those demons even though you were wrapped in so much love.”

Kinsella’s father, also a Chicago firefighter, died in 2006 at 47.

Kinsella — who was assigned to a firehouse near Irving Park and Harlem on the Northwest Side — was involved in the incident that led to the fatal shooting by police of Joshua Beal in Mount Greenwood in November 2016.

Beal, 25, of Indianapolis, had been in a funeral procession in the predominantly white neighborhood on the Far Southwest Side. He was shot by Officer Joseph Treacy and Sgt. Thomas Derouin — both off-duty — after pointing a 9mm gun at them during the melee on 111th Street, the police department has said.

According to police reports previously obtained by the Sun-Times, the fight that preceded the shooting happened outside Joseph’s Restaurant & Bar in the 3100 block of West 111th Street. The restaurant was open and was hosting a baby shower.

Treacy told detectives he was driving west on 111th Street when he saw two or three cars driving recklessly in and out of traffic near the entrance to Mount Olivet Catholic Cemetery. He said the cars boxed him in near 111th and Troy.

Kinsella told detectives he was attacked by African-Americans in the funeral procession after he ordered them to get back inside their vehicles and to stop blocking access to a nearby fire station. Kinsella suffered bruises and scratches to his face and a swollen nose, according to police records.

Photos show Ryne Kinsella's cuts.

Photos show Ryne Kinsella’s cuts. | Civilian Office of Police Accountability

Cellphone video footage posted by COPA showed Kinsella wiping blood from his nose.

It also showed Treacy pointing his gun at black people who were angrily shouting at him in the middle of 111th. Treacy can be heard yelling, “I’m the f—— police, get the f— back!” as Kinsella stands nearby.

A witness reported hearing a black woman scream at Treacy: “You think you are tough with that gun? If you’re going to pull it out, you better do something with it!” Another witness told detectives that African-Americans shouted racial epithets at Treacy.

A bartender told detectives she was smoking a cigarette outside Joseph’s around 3 p.m. that day, a Saturday, when she saw three westbound vehicles. A white man driving one of the cars yelled at black women in another car, calling them the N-word. The cars stopped, and a black man punched that white man in the face, the bartender told detectives.

“The N-word started it,” attorney Blake Horwitz, who is representing Beal’s fiancee Ashley Phifer and their two children in a lawsuit against the city, previously told the Sun-Times.

The bartender — who didn’t identify the man, according to police reports — said a white man, wearing a red T-shirt and holding a gun, yelled at the group of African-Americans who’d pulled over. He ordered them to step back, saying, “I am an off-duty officer. I’m police! I’m police!”

On Thursday, Horwitz said Kinsella had not been interviewed or deposed in the ongoing lawsuit and declined to comment further.

In a brief interview last April, Kinsella told the Sun-Times he didn’t hear any racial slurs before Beal was shot.

After the gunfire, Kinsella could be seen on video giving Beal chest compressions.

The death of Beal, who was a pallbearer for his cousin, touched off days of racial animosity in Mount Greenwood, which is home to many police officers, firefighters and other city workers.