The rapper Tupac Shakur once broke down the acronym for his mantra “T.H.U.G. L.I.F.E.”: “The hate you gave little infants [expletive] everybody,” he said of systematic injustices. “What you feed us as seeds, grows and blows up in your face.” More than two decades after his death, his message was worked into “The Hate U Give,” Angie Thomas’s best-selling 2017 novel about a black teenager who experiences those inequalities firsthand.

“Pac’s gonna always be relevant,” Khalil (Algee Smith) insists to his childhood friend Starr Carter (Amandla Stenberg) in this uneven film adaptation directed by George Tillman Jr. Moments later, Khalil will be dead, shot by a jittery white police officer who pulls them over and mistakes his hairbrush for a gun.

The messy thing about relevancy is that sometimes it means not enough has changed for the better. One way to reckon with this fact is through art — which is why, as more black artists have gotten behind the camera and entered the writers’ room, the police brutality narrative has almost become a genre unto itself. Some recent works, like “Queen Sugar,” the TV series created by Ava DuVernay, and Solange Knowles’s 2016 album, “A Seat at the Table,” have been better than others at exploring the psychological toll of that brutality with care and nuance. Mr. Tillman’s “The Hate U Give” (with a screenplay by Audrey Wells) lies somewhere in the middle.

The film opens with a powerful affirmation of blackness, both in the beauty of it and the burden. In voice-over, Starr recalls her father, Maverick (Russell Hornsby, excellent), giving “The Talk,” a familiar rite of passage for many black Americans about navigating (and surviving) a predominantly white world, to her younger self and two brothers. He wants to instill in them a sense of pride and the tenets of the Black Panther Party’s Ten-Point Program.

As a teenager, Starr is a sneakerhead who uncomfortably straddles opposing worlds — Garden Heights, a predominantly black and lower-income neighborhood, is the place she’s always called home; Williamson Prep, a fancy predominantly white private school, is where she and her siblings, Seven (Lamar Johnson) and Sekani (TJ Wright), attend school. She works hard every day to keep them separate, hiding her white boyfriend, Chris (K.J. Apa), from her father, while policing her own appearance and actions at school. Black vernacular makes her white classmates cool, she observes. “Slang makes me ‘hood.’”

Her code switching is the most intriguing story line here, partly because young black female protagonists in popular culture are still few and far between. (A majority of recent films and TV shows starring black characters, like “Insecure” and the “She’s Gotta Have It” TV remake, have focused on 20- and 30-somethings.) Ms. Stenberg strikingly embodies Starr’s dichotomies — self-doubt and bouts of confidence; introversion and outspokenness — but the film’s driving plot is Khalil’s death and how it pushes Starr to come into her own as an activist.

Yet the script struggles to effectively weave this all together with the kind of thoughtful complexity that Ms. Thomas brought to her young-adult novel. Mr. Apa’s Chris, for instance, makes for a bland if earnestly supportive boyfriend, and the film glosses over his troublesome recitation of the tired axiom “I don’t see color” when expressing his disappointment with how Starr has kept her connection to the shooting a secret.

Elsewhere, the rapper Common has a small role as Starr’s uncle Carlos, a police officer. There’s only a vague understanding of the tension that comes with being in such a position, condensed to a conversation late in the film in which he defends police shootings to Starr by explaining what an officer might be thinking when interacting with a civilian. Thankfully the moment doesn’t end on a #BlueLivesMatter note, though it comes close. But it’s a missed opportunity; after a succinct rebuttal from Starr, the plot pushes on.

That’s the other thing about cultural relevancy — if you rely on it too much at the expense of deep characterization, you’ll barely scratch the surface. Ms. Stenberg, Mr. Hornsby and others in the ensemble (including Regina Hall as Starr’s mother, Lisa) are more than capable of exploring their characters’ depths, but a wonky script gets them only so far.

The Hate U Give
Rated PG-13 for traumatic violence. Running time: 2 hours 12 minutes.