BEVERLY HILLS, Calif. — In the 2002 comedy “Barbershop,” the most worrisome problem facing the shop owner Calvin Palmer (Ice Cube) is a duplicitous loan shark who wants to turn the neighborhood fixture into a strip club. Two years later, in “Barbershop 2: Back in Business,” Calvin’s biggest headache is competition from Nappy Cutz, a national franchise opening up across the street that, according to Calvin’s own clients, boasts “honeys in bikinis” serving wine to clients and live fish in the floor that customers can have fried, grilled or “fondued.”

In “Barbershop: The Next Cut,” which opens this week, Calvin’s problems are considerably worse than just evil moneylenders and rival shops. Money is still tight; to make ends meet, he’s sharing space and chairs with a beauty salon run by Angie (Regina Hall). But larger troubles are looming right outside the barbershop’s doors, on the streets of Chicago’s South Side. Kids and cashiers are getting shot over trifles; in one darkly comic scene, the denizens of the shop try to one-up one another over who’s been robbed most often.

“I wanted to do a movie about what’s really going on in Chicago,” Ice Cube explained.

But how does one begin to make a funny movie about gun violence, a devastating problem in Chicago, which has experienced a sharp rise in shootings this year? The “Barbershop” franchise (two movies and a 2005 TV series) has occasionally glanced at serious subjects. When the shop’s elder, Eddie (Cedric the Entertainer), poked fun at Rosa Parks and Martin Luther King Jr. in the first film, black leaders, including Al Sharpton and Jesse Jackson, called for a public apology from the studio MGM. But the franchise seemed an unlikely vehicle to address the topic of gun violence on Chicago’s South Side — even if the shop’s location is at ground zero of the conflict.

To take on the challenge — and revive the series after a 12-year hiatus — a producer, Robert Teitel, turned to Malcolm D. Lee, the director of “The Best Man,” the 1999 ensemble movie, and its 2013 sequel, “The Best Man Holiday.” Both films had been box-office hits, and both required Mr. Lee to mesh comic moments with dramatic scenes revolving around topics like infidelity, work woes and cancer. “If you look at the actors that I cast in ‘Best Man,’ Terrence Howard, Harold Perrineau, they’re not comedic actors,” he said. “But they’re great actors who can embody a role and make it funny.”