Gillian Laub, a photojournalist, came back from Georgia in 2009 with striking documentation of an open secret: segregated proms in Montgomery County. “A Prom Divided” ran in The New York Times Magazine a month later, and the pictures were so telling that the school district buckled and broke its longstanding tradition.

Ms. Laub returned the following year to record the high school’s first integrated prom on film. The county sheriff made sure that didn’t happen, by reaching into her car and wrestling the video camera out of her hands — the picture goes awry but we hear her shocked screeches.

Ms. Laub never made it to the prom that day, but she did return with a film, “Southern Rites.” This HBO documentary, which debuts on Monday, is a riveting look at something quite different but not entirely unrelated: the story of Justin Patterson, a 22-year-old black man who was shot and killed by an older white man, Norman Neesmith, in a neighboring county in 2011.

Or, as Ms. Laub puts it, “Then I stumbled on a more complicated story.”

What happened to Justin, his family, his friends and his killer is complicated, but at its core the case is actually quite simple. In a calm, understated tone, “Southern Rites” digs deep to expose the roots that have made segregated proms and other affronts possible. “Southern Rites” is a portrait of the inequities that lead to disaster on the streets of cities like Baltimore and Ferguson, Mo.