David Duchovny (left) and guest star Rhys Darby in “Mulder & Scully Meet the Were-Monster.” Photo: Ed Araquel/FOX

“Mulder and Scully Meet the Were-Monster” was well on its way to becoming a pantheon X-Files episode, but the graveyard scene between Fox Mulder (David Duchovny) and the shape-shifting lizard creature (Flight of the Conchords regular Rhys Darby) put it over the top. “Did you lose somebody recently?” Mulder asks in last night’s episode, finding his quarry, perhaps inevitably named Guy Mann, loitering near a couple of tombstones. “Yeah,” Mann says. “Myself.”

It’s the sort of rueful philosophical exchange, poised on the edge of self-parody without crossing over, that could only have been written by Darin Morgan (who directed the episode as well), the brother of X-Files writer-producer Glen Morgan (no slouch himself) and the most playful and idiosyncratic of the show’s storytellers, which is saying a lot. Morgan’s first contact with the series was as a performer: He played the Flukeman in season two’s “The Host,” then got a story credit for consulting on the next episode, “Blood.” He only wrote a handful of scripts, but his work deepened and embellished creator Chris Carter’s themes and characters even as it stood apart from the show as a whole. “What I loved about his scripts,” Duchovny once said, “was that he seemed to be trying to destroy the show.”

Morgan’s aesthetic, as PopMatters’ Jonathan Kirby put it in 2007, was “satirizing the two agents’ personas and relationship while simultaneously lending them greater human depth, a sly but affectionate skewering of the show’s conspiratorial norms.” He managed to write X-Files episodes that were also metanarratives about The X-Files, and what it means to love The X-Files and become invested in its alternately paranoid, goofy, horrifying, and lyrical universe. And with his interest in storytelling, narcissism, alienation, individual and species-wide delusion, pop culture and literary allusions, and self-referential jokes, Morgan is the ideal person to bring this long-delayed tenth season (or mini-season) up to the level of The X-Files’ best stuff.

On a deeper level, Morgan’s scripts were always about stories, and the inability of humans to consider lives other than the ones they’re currently living because of the narratives encrusted on their consciousness, and the primal human desire to impose narrative on a seemingly unruly, unfair, senseless life. “Mulder, the human mind naturally seeks meaningful patterns and configurations in things that don’t inherently have any,” the psychic title character of “Clyde Bruckman’s Final Repose” tells Mulder. Morgan’s “Humbug” was set among a community of former circus-show performers, including Dr. Blockhead, the Enigma, Jim Jim the Dogface Boy, and Lanny, a drunk with an inchoate conjoined twin named Leonard; the entire episode is about the passing of one way of life and the panicked quest to find another one and keep living (the question of Leonard, who wants to find a new host to replace the brother who’s dying of liver failure). “War of the Corprophages” finds Mulder and Scully (Gillian Anderson) investigating an incipient invasion of Earth by extraterrestrial cockroaches. It drew parallels between insects that are more intelligent than were assumed, and humans, who smugly fancy themselves superior to insects but exhibit many of the same behaviors. And it made Scully and Mulder seem about as normal as Scully and Mulder can seem (we see Scully shampooing a dog, eating ice cream out of the carton, and reading Truman Capote’s Breakfast at Tiffany’s, itself a reference to Duchovny’s appearance on Celebrity Jeopardy, in which he whiffed on a Capote-related question).

Morgan really flowered, though, once he began inserting authorial figures into his scripts. The title character of “Clyde Bruckman’s Final Repose,” played by the late, great Peter Boyle, can foretell the circumstances of others’ deaths (and his own), and therefore has a quasi-authorial distance from the same world he has to move through; this makes him as alienated, melancholy, and cripplingly self-aware as Guy Mann. (Not for nothing was Bruckman’s dog, which Scully briefly inherited, named Queequeg, after a harpooner in Moby-Dick, a novel with one of the most influential first-person narrations in Western literature.)

Morgan told The Hollywood Reporter that the tone of “Clyde Bruckman” was inspired by another sad-and-sweet episode of The X-Files, “Beyond the Sea,” co-written by his brother and James Wong, and that it was meant to shift focus to Scully and cast a critical eye on Mulder, who he said was treated “a bit more heroically” by other writers. “My pitch to Chris [Carter] was, because Mulder’s interested in [Bruckman’s] psychic ability, that’s all he focuses on, and [he] doesn’t really treat Clyde Bruckman as another human; he’s just interested in the phenomenon. Because Scully didn’t believe in it, she could treat him as a person, and see how his belief that he could see the future had ruined his life.”

In season three’s “Jose Chung’s From Outer Space,” Morgan created something like an authorial surrogate in Jose Chung (Charles Nelson Reilly), a thriller writer who interviews Scully and Mulder for a novel about an alien abduction based on an X-Files case. The script juxtaposes conflicting versions of the same story and calls the veracity of their characters into question, while stirring in comedic visions of rival alien species; Bigfoot; Men in Black; memory erasure, and an “Alien Autopsy” video narrated by the phony psychic the Stupendous Yappi from “Clyde Bruckman’s Final Repose.” Lord Kinbote, the enormous red alien who supposedly takes one abductee to “the center of the earth,” was deliberately shot to look charmingly archaic rather than frightening, using techniques that approximated the stutter-step movements of animator Ray Harryhausen’s stop-motion monsters. Morgan brought Chung back for an episode of The X-Files’ sister series, Millennium — “Jose Chung’s Doomsday Defense,” an absurdist goof on Scientology. L. Ron Hubbard becomes “Selfosophy” founder Oonan Goopta, a mentally ill ex-neuroscientist whose early attempts at novel-writing were, Chung says, so terrible that they were mistaken for “brilliant parodies.” The episode’s title comes from one of Chung’s books, which predicts that the turn of the millennium will usher in “one thousand years of the same old crap.”

Morgan elevates this latest season not just by acknowledging the march of time in a graceful, self-deprecating way (something the premiere, “My Struggle,” and the second episode, “Founder’s Mutation,” also did, though perhaps too bluntly), but by burying references to the show’s long onscreen and offscreen history into every nook and cranny of the script. (My colleague Keith Uhlich listed all of them here, if you’re interested.) In last night’s “Were-Monster,” Guy Mann’s story is, in its way, also the story of Fox Mulder, who begins the episode lamenting how time has aged him, changed the nature of his job, and made him wonder what the point of it all is; and Scully, whose own existence is permanently fused to Mulder’s, both professionally and biologically (through their child). And it’s the story of David Duchovny and Gillian Anderson and Chris Carter and everyone who’s ever worked on or watched the show. The characters have grown older in both body and spirit. (“I’m a middle-aged man, Scully,” Mulder grouses in the opening scene. “No, I am. I am!”)

Meanwhile, some of the show’s key contributors have died, and two of their names are represented on tombstones in the cemetery: director Kim Manners, who helmed 52 X-Files episodes, and Jack Hardy, an assistant director on Millennium and The Lone Gunmen. Since The X-Files ended its run in 2002, its alien DNA has been absorbed and reconstituted by any number of subsequent programs, including Fringe, on which Morgan briefly worked as a consulting producer. (This is not the first time Morgan has paid tribute to Manners: “Jose Chung’s From Outer Space” featured a “Detective Manners,” whose profanity matches that of his real-life namesake, but his curses are replaced by phrases like “blankety-blank.”)

The cemetery scene builds out into a sweet, beguiling episode-within-an-episode, consisting of Mann telling Mulder a very long story that amounts to Franz Kafka’s The Metamorphosis turned inside out. The lizard-man was living a perfectly happy life scuttling around in the forest until he was bitten by a human, assumed human form, and acquired human impulses, including the urge to wear clothes (including a tie, which he finds incomprehensible), live indoors (in a fleabag motel, alas), have orgasms (via porn; his options are limited), get a proper job (he settles for working at a cell-phone store, where he has “no idea what I’m saying, and neither do my customers”), and set down some words for posterity (“If I haven’t written my novel by now, I’m never going to write it, you know?”).

“Evidence of extraterrestrial existence remains as elusive as ever,” said Chung in “Jose Chung’s From Outer Space,” “but the skies will continue to be searched by the likes of Blaine Faulkner, hoping to someday find not only proof of alien life but also contentment on a new world. Until then, he must be content with his new job.”

Mann is embroiled in an existential crisis so profound that he’s resolved to kill himself to end the pain. Mann attacks Mulder, hoping to force the agent to stab him to death with the shard of a beer bottle; green glass to the appendix supposedly does the trick with lycanthropic lizard-men. But Mulder, who’s going through his own crisis (part typical midlife, part job-related), declines. The episode at first seems very low-stakes. We never fear for Scully or Mulder’s safety, and Mann’s lizard incarnation, like Mulder’s ineptitude with a cell-phone picture app, is treated as a joke. The bipedal, horned, toadlike “monster” is clearly just a guy (ahem, Guy) in a suit. His hunched-over, tippy-toed run underlines his harmlessness. He’s just a pathetic, cursed creature, different from his homosapien interrogator only in the physical details. He struggles to find meaning and purpose in life, to meet the ridiculous expectations placed upon him, to connect with other people, to fulfill his fantasies. Humanity is treated here less as a biological fact than sets of learned behaviors, ones that can be transmitted through the bloodstream like any other communicable disease.

The only cures are death, looming at hip height all around Mulder and Mann in the cemetery, and love, briefly incarnated by Mann’s dog, Daggoo. The pooch occupies barely a minute of screen time, but his loss is keenly felt. The image of a blood-tear-spitting lycanthropic lizard cuddling on a motel rug with his doggie sums up Morgan’s specialness.

“As a storyteller, I’m fascinated by how a person’s sense of consciousness can be so transformed by nothing more magical than listening to words … mere words,” says Chung in “Jose Chung’s From Outer Space.” Darin Morgan’s magic act continued last night. He still has some tricks up his sleeve.