At times, “The Last O.G.” is as harrowing as a drama. Star and executive producer Tracy Morgan plays Tray, a character the audience meets on the day he finishes a 15-year prison sentence.

He steps off a city bus that goes from downtown Brooklyn through the rapidly gentrifying neighborhood of Crown Heights and is nearly run over by a white woman with a stroller. The contrast is comical, yes, but Tray’s isolation is real; he can’t locate the neighborhood he used to belong to. Rebuffed by his ex-girlfriend Shannon (the flawless Tiffany Haddish), who has established a career and a family for herself, Tray resigns himself to a halfway house run by the wannabe comic Mullins (Cedric the Entertainer) and minimum wage work at one of the borough’s many coffee shops. He has an easy smile and secret resilience, but it is hard to not be terrified for Tray’s chances back in the real world, which has changed so much in the years he’s been gone. You can sense — and sometimes, openly hear — that the whole city is laughing at him.

“The Last O.G.” struggles to reconcile its inherent tragedy with slightly crass comedy. In any given scene, it’s a toss-up as to which side will win out. It’s built much more like shows in the prestige comedy model popularized by HBO’s “Girls” — but at the same time, “The Last O.G.” aims to dismantle the lens of the demographic reflected in “Girls.” It’s executed imperfectly, in more ways than one. But when the show executive produced by “Get Out” director Jordan Peele touches the sublimity it strives for, it offers a deeply empathetic vision of a world that doesn’t often make it to TV.

That interpretation rests almost entirely with Morgan’s Tray, who brings touching complexity to a character that is hard, at first, to root for. Tray is frustrating: He’s naively expected Shannon to wait for him for 15 years, and once he’s out of prison, he invades her life, inserting himself into her moments in the limelight and insinuating himself into the lives of her two children. (He is the twins’ biological father, but that doesn’t quite justify kidnapping two 15-year-olds for an afternoon.) He has a habit of remarking on the desirability of women customers while taking their orders, and in his casual conversations with his housemates, there’s an undeniable streak of misogyny and homophobia.

But on the other hand, Morgan shows the audience the whole person — the precarious isolation of life as an ex-con; the loneliness of being stranded without Shay or his children; the hollowness of middle age; the desperation of lost time. It is Morgan’s most heartfelt performance yet, one that incorporates the blunt instrument of his comedy into a portrait of a pathetic but fully interior character. Tray is sometimes so obtuse it’s infuriating, but with just a nudge, Morgan can turn him into a fallen hero.

Aside from Morgan — and Haddish, who has amply proven herself elsewhere and does a lot with a limited role here — “The Last O.G.” isn’t quite sure what it wants to say. Sometimes it feels that there is not enough story to go around, and in other scenes it reads as if the show is deliberately backgrounding plot to emphasize relationships. But either way, there is not enough to latch onto in the show. The first six episodes lay the groundwork for a reckoning with the dealer who got Tray sent to prison, Wavy (Malik Yoba), and shake out some skeletons in the closet from Tray’s time in prison (which end up taking the form of a vengeful, hilarious Chrissy Metz). Neither is enough to flesh out the season, which already feels tonally disjointed. And though there are worse things than contemplating Morgan’s performance, there may not be much worse than enduring Mullins’ very bad “comedy,” which is punctuated more than once with the phrase “dick licker.”

Still, when the show is good, it’s so good. The fourth episode of “The Last O.G.,” “Swipe Right,” is one example. In it, Tray’s friends try to get him to move on from fixating on Shay to dating someone new, and they help him set up a Tinder account. What follows is evocative of the sweet subtlety of an episode of “High Maintenance,” where two strangers meet and share something intangible and precious. It’s surprising to see Morgan’s broad style, popularized on “30 Rock,” presented in such a sincere framework. At first I wondered if there was some extra layer of comedy at work underneath the surface of the little romance. But there is no other layer. The episode is a little vessel of hope on the turbulent waters of Tray’s life, and it sails along bravely, into the Brooklyn sunset. As long as “The Last O.G.” can produce moments like this, it will be a show well worth watching.

TV Review: ‘The Last O.G.,’ From Tracy Morgan

Comedy, 10 episodes (6 reviewed): TBS, Tues. April 3, 10:30 p.m. 30 min. (SXSW premiere March 12.)

  • Crew: Executive producers, Tracy Morgan, Jordan Peele, Eric Tannenbaum, Kim Tannenbaum, Joel Zadak, John Carcieri.
  • Cast: Tracy Morgan, Tiffany Haddish, Allen Maldonado, Ryan Gaul, Taylor Christian Mosby, Dante Hoagland. With Cedric The Entertainer.