“Like too many children in Chicago, I experienced the trauma of gun violence firsthand as a child,” he said. “I saw how these unspeakable acts could tear a family apart. I also saw how those who were sworn to protect our city instead relied on prejudice and intimidation. I could have easily learned to hate this city. But my family taught us to love it.”

Chicago becomes the latest in a series of large cities this year to experience turnover at the top of their police departments. The Philadelphia police commissioner abruptly resigned in August, the chief in Charlotte, N.C., announced plans to step down, and a new commissioner was appointed this week in New York City.

On Friday, Chicago officials announced that Charlie Beck, a former police chief of Los Angeles, was being appointed as interim superintendent to fill Mr. Johnson’s post until a permanent replacement is picked.

Mr. Beck was known in Los Angeles for embracing changes to police use-of-force standards and insisting that the best way to reduce crime was for officers to improve relationships with people in high-crime neighborhoods. He was also known for his support of technology to fight crime including predictive policing.

During more than three years in charge of the Chicago Police, the second-largest municipal police force in the country, Superintendent Johnson led an overhaul in training, introduced more restrictive rules for when officers could use force, and guided the department into a court-enforced consent decree with the Justice Department . After a large rise in homicides early in his tenure, the city’s murder rate has steadily dropped.