David Lipsky (Jesse Eisenberg), left, interviewed David Foster Wallace (Jason Segel) in 1996, and the interviews became a 2010 book. (A24 via AP)

On the most superficial level, “The End of the Tour” is about David Foster Wallace, who electrified the literary world in 1996 with the publication of his epic breakout novel “Infinite Jest,” and who took his own life in 2008.

As Wallace, Jason Segel (best known for his comedic work on “How I Met Your Mother” and as a member of Judd Apatow’s repertory company) delivers a sweet, shambolic performance, affecting a doughy softness and the author’s signature wire-rim glasses and bandanna. But to appraise “The End of the Tour” as a portrait of a tortured genius too fine for this world is to risk missing the point of the film. In the hands of screenwriter Donald Margulies and director James Ponsoldt, Wallace becomes a character in his own right: a brilliant, compulsively engaging player in a pas de deux that touches on everything from creativity, ambivalence and competition to the unspoken rules that govern celebrity reporting at its most transactional.

“The End of the Tour” is an adaptation of “Although of Course You End Up Becoming Yourself,” the 2010 book written by journalist David Lipsky. As Wallace was finishing his 1996 book tour for “Infinite Jest,” Lipsky was assigned to write a profile of him for Rolling Stone. Although his piece was never published in the magazine, Lipsky decided to transcribe their five-day encounter after Wallace died.

It bears noting that Wallace’s family and estate have strongly objected to the movie version, insisting that Wallace would have been mortified to be reduced — and inevitably distorted — to a cinematic construction. It also bears noting that “The End of the Tour” accomplishes what the best fact-based dramas aspire to, occupying a space between truth and fiction that illuminates otherwise obscure corners of what it means to be human. Part love story, part road trip, part elegy to a bygone, pre-9/11 age, “The End of the Tour” brims with compassion and sharply honed insight. Even at its funniest and most testy, this brief bromance aches with tenderness and a wistful sense of loss. / A24 FilmsBased on a true story, "The End of the Tour" tells the tale of the 5-day interview between Rolling Stone reporter David Lipsky and novelist David Foster Wallace following the release of his acclaimed novel "Infinite Jest."

Based on a true story, "The End of the Tour" tells the tale of the 5-day interview between Rolling Stone reporter David Lipsky and novelist David Foster Wallace following the release of his acclaimed novel "Infinite Jest." (  / A24 Films)

Segel’s opposite number is Jesse Eisenberg, who brings his usual rabbity recessiveness to the character of Lipsky, who when he trudges out to Bloomington, Ill. — where Wallace is teaching — has just published his own novel. Arriving at Wallace’s unprepossessing ranch home, he’s prepared to meet the heroic author and burgeoning literary rock star that he has conjured in his most resentful speculations. Instead, Wallace turns out to be as ungainly and endearing as his two sloppily affectionate black Labs.

He’s also a tongue-tied, reluctant subject. But once Lipsky turns on his tape recorder, and conversation begins, it doesn’t end for nearly a week. Bonding over candy and junk food in the bleak snowscape; flying to Minneapolis for a reading and a reunion with two pretty acquaintances of Wallace’s; smoking cigarettes late into the night; listening to R.E.M. — the two Davids often resemble doppelgangers, one coming to terms with being on the verge of greatness, the other simultaneously mesmerized and threatened by the fact that it’s someone else and not him.

Margulies, a playwright, was just the right choice to write the script. Filmed like a chamber piece, “The End of the Tour” begins with Wallace dazzling Lipsky with his off-handed exegeses of pop culture, his command of moral subtleties and his surpassing humility. Eventually — inevitably — it curdles into a coded, passive-aggressive fight for control. In a telling gesture, Lipsky brings along a copy of his book when he embarks on his journey to meet Wallace. Just as pointedly, Wallace never asks to see it.

All of this sounds talky. (It is about a couple of guys sitting around talking, after all.) But Ponsoldt, who directed “The Spectacular Now” and “Smashed,” creates a wonderfully dynamic space for the words to flow, packing in an enormous amount of visual information just in how Wallace decorates his house or the way a waitress says, “I’ll be right back with your pop,” when he orders a Diet Rite. The narrative dynamics pick up a bit when Wallace and Lipsky arrive in Minneapolis: Joan Cusack perfectly captures the chirpy volunteer escort who drives them around town, and Mamie Gummer and Mickey Sumner are just as vividly effective as female friends of Wallace’s who spark a freighted encounter between the two men.

Improbably, “The End of the Tour” doesn’t just sustain the audience’s interest in Wallace and Lipsky’s exchanges, arguments and moments of bonding, but invites us to care deeply about the men. By rights, the defenses, disclosures, confessions and manipulations of two little people shouldn’t amount to a hill of beans. But by collaborating to create their own intimate encounter, Wallace and Lipsky become avatars of higher things, each trying to reconcile art and ambition, ego and moral character, pleasure and meaninglessness. At its simplest, “The End of the Tour” obeys the cynical tenets honored by celebrity journalists since the beginning of the form: Fall in love with the subject when you report, break up when you write. In the sensitive hands of Ponsoldt, Segel and Eisenberg, what begins as a grand seduction winds up being a thoughtful, moving testament to genuine connection.

R. At area theaters. Contains coarse language, including some sexual references. 106 minutes.