BoJack Horseman. Photo: Courtesy of Netflix

The most structurally dazzling and heartbreaking comedy on TV is an animated show about a talking horse. Nobody could have imagined typing that sentence, much less reading it, three years ago, when Netflix debuted Raphael Bob-Waksberg’s half-hour cartoon BoJack Horseman, a showbiz satire set in an alternate universe where humans and anthropomorphic animals coexist. But here we are. The show’s fourth season is not just its best, it’s the finest single season of a comedy in ages, though the persistent melancholy and focus on shame and guilt mark it as a comedy-drama: As the hero, BoJack (Will Arnett), a former sitcom star and sex-addicted alcoholic, would put it, it’s “not funny ha-hah but funny ‘Doonesbury.’ ” (It’s also funny Mad Men: The title character’s sour charisma, addictive tendencies, and deep self-loathing are Don Draper–esque.) BoJack’s first three seasons were strong as well, always clever and fitfully brilliant, and certain episodes were gobsmackingly original. My favorite up to now was season three’s “Fish Out of Water,” which sent BoJack to an underwater film festival where non-fish had to wear diving helmets; all the scenes set at the festival were essentially animated silent cinema.

But there was always more to BoJack than the seeming one-joke broadness of its premise. (It’s like The Larry Sanders Show, or Episodes, but with animals!) In season four, the show’s interest in psychology merges with its other concerns in an organic, fully realized way, restating its belief that even people who think of themselves as broken or worthless deserve a shot at happiness — and can achieve it if they’re willing to commit selfless acts and realize that other people’s lives matter as much as their own. The show avoids returning to the Byronic cliffs of despair where it left BoJack at the ends of seasons two and three (which concluded with an ill-advised tryst with a teenager and a former co-star’s drug overdose, respectively). Season four serves up two endings in its last couple of episodes: one bleak, the other hopeful. BoJack installs his elderly mother, Beatrice (Wendie Malick), a profoundly damaged woman who was never capable of showing him love and is now suffering from dementia, in a shabby Michigan nursing home, geographically as well as figuratively turning his back on her. Concurrently, though, BoJack expends great effort trying to locate the birth mother of Hollyhock (Aparna Nancherla), the teenager who claims to be his daughter. His heroic quest resolves in a moving finale that evokes season seven of Mad Men, which likewise insisted that a depressive, substance-­addicted narcissist could will himself a few steps closer to enlightenment without compelling forgiveness from the people he’d hurt or magically erasing his flaws.

These 12 episodes are more strongly serialized than any that have come before. Ongoing plotlines involving BoJack; his maybe-daughter, Hollyhock; his manager, Princess Carolyn (Amy Sedaris); his friends Mr.

Peanutbutter (Paul F. Tompkins) and Diane (Alison Brie); and other characters subtly mirror, reinforce, or deepen each other. As the season progresses, the show keeps returning to key situations or ideas with a deft confidence that is (yes, really) symphonic. At the same time, the writing staff gives each episode the shape of a good short story, making the series pleasurable viewing for those who prefer one-offs and have no intention of watching the whole thing. Bob-Waksberg and his collaborators always keep the show’s potential for belly-laugh, slapstick satire within easy reach. They showcase it most fully in scenes dealing with BoJack’s goofball sidekick Todd Chavez (Aaron Paul) and in a story line in which dimwit superstar dog Mr. Peanutbutter runs for California governor against incumbent Woodchuck Couldchuck-Berkowitz (Andre Braugher), an experienced, super-competent, but dull career politician who’s furious that a charismatic but unqualified nimrod would dare run against him. (Sound like any presidential candidates you know?) Fakeness, deception, and self-deception are teased out in countless conversations and italicized in two key moments involving forged signatures on documents — all of which ties in with the self-castigating language of major characters, BoJack especially, who feel deep down that they’re fake, that their feelings are fake, their achievements are based on fraudulence, that other people are lying when they say they love them, so why not drink until you pass out?

The wounding power of memory coupled with self-loathing, always a key strand of the series’ DNA, is expressed most forcefully in BoJack’s masochistic internal monologues (“You’re a piece of shit,” he keeps repeating) as well as his imagining of his mother’s unhappy childhood and the early years of his parents’ troubled marriage (envisioned in a 1940s flashback filled with made-up “period” vernacular that BoJack probably stitched together from his memories of old movies). This idea gets a workout in Beatrice’s formally dazzling flashback episode, which shifts between past and present, reality and fantasy, in the manner of the Sopranos episode “The Test Dream,” then crosscuts between the birth of two children in two different eras (demonstrating that Beatrice, too, is capable of righteous acts, even though BoJack will never know that because she can’t effectively communicate with him any longer). Speaking of DNA, there’s even more attention paid here to the role of biology in destiny, a notion expressed not just in scenes dealing with Holly­hock’s desire to locate her birth parents but in Princess Carolyn’s attempts to get pregnant. (Harvey Fierstein provides the voice of her talking fertility watch, which rasps, “I’m Harvey Fierstein, let’s put a baby in you!”)

Connecting all of these stories is BoJack’s quiet insistence that selfish personal acts can have devastating consequences, even if we can’t immediately see the damage they’re causing. In one of the finest self-contained “bottle episodes” of this year, a fund-raising party at Mr.

Peanutbutter’s house becomes a nightmare comedy of survival with echoes of Lord of the Flies and The Exterminating Angel after the house collapses in a sinkhole created by the fracking that Mr. Peanutbutter allowed on his property. Trapped under the earth, the partygoers are forced to devise a makeshift government based on fear and lies. (One guest has a medical condition that gives him an orgasm whenever he senses a shift in power.) In the end, the series seems genuinely hopeful that intelligent animals, humans included, have the ability to change for the better and be happy, a psychological state that Don Draper once defined as the “moment before you need more happiness.”

*This article appears in the September 18, 2017, issue of New York Magazine.