ST. LOUIS — Milton Green was in the driveway of his home on St. Louis’s North Side one night when he suddenly found the barrel of a gun pointed in his direction. Right away, his police training kicked in: He pulled a badge from beneath his T-shirt and grabbed ahold of his service weapon, a 9-millimeter Beretta.

“Police! Put the gun down!” Mr. Green shouted to the man with the gun, who had been fleeing the police when the car he was riding in crashed in front of Mr. Green’s red brick bungalow.

Mr. Green’s shift as a community liaison officer with the St. Louis Metropolitan Police Department had ended hours earlier, and he was spending a quiet evening helping a friend work on his pickup truck. Then a sedan came screeching around the corner and ended up near his front yard. Another sedan pulled up in a hurry, and Mr. Green felt a brief sense of ease when men in police vests hopped out. They were fellow officers. Sort of.

Mr. Green had been a police officer for more than a decade. And while he had bonded with colleagues across the department, he also had come to see distinct differences between black officers like himself and white officers like those involved in the pursuit that night. He had heard his share of racially insensitive remarks at work, but on that balmy evening in 2017, Mr. Green’s outlook on the differences between black and white officers would be damaged beyond repair.