Dr. Dre doesn’t surface often — since N.W.A. disbanded in the early 1990s, he’s released just two albums and supervised one compilation — but when he does, he exudes what feels like decades’ worth of tension.

A recurring theme of Dr. Dre’s lyrics and self-selected narrative is sacrifice. He walked away from Death Row Records, leaving behind his 50 percent ownership stake, worth millions of dollars, to secure his creative freedom and security. On his albums, he labors hard behind the scenes as a producer but is generally reluctant to hog the spotlight, instead showcasing others on his coattails.

And when he raps, it’s often with exasperation — not boasts, but sighs — like a parent cleaning up his children’s mess. “I’m very aware hip-hop needed something to carry it/So I married that bitch and swung down in that chariot,” he raps, somewhat bafflingly, on “Genocide,” a hard-snapping song from “Compton” (Aftermath/Interscope), his third album, and first in 16 years. On “All in a Day’s Work,” he’s more succinct: “Though I gave everything to this game, they still complain.”

No one in hip-hop has built as impressive and seemingly bulletproof a reputation with as little material as he has: His debut album, “The Chronic,” came out in 1992, followed by “2001,” in 1999. He’s been one of hip-hop’s signature musical innovators, from N.W.A.’s gangster rap to his own G-funk to Eminem’s carnival-esque novelties and beyond. And yet, for no one else is resentfulness so central.

That’s partly because of the decade-plus tease of “Detox,” the greatest example of performance anxiety in hip-hop history. He first announced it as his third album in 2002; only a week ago did he finally admit defeat, saying it would never be released.

“I didn’t like it,” he conceded during his radio show on Beats 1, the Apple Music station. “I don’t think I did a good enough job.” (Last year, Apple bought Beats Electronics, of which Dr. Dre was one of the principals. He subsequently bragged that he was “the first billionaire in hip-hop.”)

Carrying hip-hop on his back has been relatively light work for Dr. Dre, when he has deigned to do it, but what he wants, mostly, is to be a conduit for others — to get out of the way.

“Compton” — which was inspired by “Straight Outta Compton,” the new N.W.A. biopic of which Dr. Dre was an executive producer — is a combination of utter confidence and distracting hodgepodge. Musically, it’s ornate and grand-scaled, and somehow also deft. But there’s almost an open-door policy in place for collaborators, meaning that attack dogs like the new Compton superstar Kendrick Lamar coexist alongside more dubious talents, like the young Dre protégés Justus and King Mez. (In this, it recalls the scattershot 1996 compilation “Dr. Dre Presents ... the Aftermath.”)

But those are microconcerns, and Dr. Dre is macrominded. His true peers aren’t other hip-hop producers, not even tenured greats like Kanye West or Pharrell Williams of the Neptunes or even DJ Premier, the New York formalist who produces one song here, “Animals,” in a sort of fantasy-league, best-of-both-coasts arrangement. All of them, even the ambitious Mr. West, focus primarily on how small parts of songs interact to create the whole. You can hear the gears at work.

Dr. Dre, by contrast, is more concerned with atmosphere, mood and texture. He has a production credit on about half of the songs on this album — and he uses samples elegantly, a dying skill — but he was involved with mixing all of them, and that’s a more important detail. They all share a tactile physicality. Ever since “The Chronic,” it’s been clear that Dr. Dre’s real peers are film score composers — say, John Williams or James Horner — who communicate emotional direction with broad, legible strokes that set the tone for the details sprinkled atop.

Because of that, Dr. Dre’s albums have always felt as if they were about something other than the man himself. “The Chronic” was Snoop Doggy Dogg’s coming-out party, and “2001” was partly a showcase for Eminem, but also for plenty of others (Knoc-turn’al, Hittman). Whether it’s out of generosity, reluctance, fear or habit, Dr. Dre rarely, if ever, wants to stand alone.

Mainly, though, what “Compton” shows is that Dr. Dre isn’t racked by self-doubt. He merely needs some kind of muse, something bigger than himself to believe in. In this case, the muse is both the city and the history on display in “Straight Outta Compton.”

On “Talk About It,” he raps, “I remember selling instrumentals off a beeper,” and on “Talking to My Diary,” he recalls his early days in N.W.A. A sample of Eazy-E’s voice appears on “Darkside,” and “For the Love of Money” borrows its hook from Bone Thugs-n-Harmony, who were signed to Eazy-E’s label, Ruthless. Ice Cube appears, somewhat clumsily, on “Issues.” Dr. Dre’s former protégé Snoop Dogg (many years past the Doggy) is here, as are the established Los Angeles rappers the Game, penetrating on “Just Another Day,” and Xzibit and Cold 187um (of Above the Law), who both shine on the ecstatically thumping “Loose Cannons.” Eminem is reliably crass on “Medicine Man,” including one particularly toxic line about rape.

In light of the recent agonizing over the use of ghostwriters in hip-hop, it’s worth noting that Dr. Dre has long been understood to use young talent to contribute to his rhymes. Read the credits while listening to his verses, and it’s possible to make some educated guesses about who’s doing the puppeteering, whether because of the content — there are more flickers of political stridency than usual — or because of the flow, with Dr. Dre rapping in tricky syllabic patterns that his voice clearly doesn’t feel comfortable with. He tends to take on the qualities of whomever he’s sharing the song with, an odd concession from such a singular talent.

That’s a form of hiding, too, though. And on “Compton,” he has at least one good reason to fade into the background: Mr. Lamar, who appears on three songs. Mr. Lamar is the photo negative of Dr. Dre — he’s a dense lyrical technician who can be all trees, no forest. As strong as his albums have been, he’s still needed the caress of a Dr. Dre.

“Deep Water” showcases each at his best — it’s more propulsive than almost anything on Mr. Lamar’s recent album, and still an accommodating home for his dexterous verse. It’s an act of genuine intergenerational sharing. 

For years, Dr. Dre was writing Compton’s story primarily through music; Mr. Lamar has made it the subject of his advanced-placement parables. Both men’s approach to their hometown is different, and personal — and here, for the first time, they’re truly in sync.

“Compton,” Dr. Dre has said, will be his “grand finale.” Maybe that’s because the torch is finally passed, and now he doesn’t owe anyone anything anymore.