The first thing the documentary “Jim & Andy: The Great Beyond — Featuring a Very Special, Contractually Obligated Mention of Tony Clifton” does is make “Man in the Moon” — Milos Forman’s 1999 film about Andy Kaufman, starring Jim Carrey — a much more interesting movie. Behind the scenes, Carrey had internally expunged himself to channel the late, great, love-to-hate “Taxi” star and comedy disrupter 24/7, including long, crew-menacing stints as Kaufman’s paunchy, guttural lounge-singer boor Clifton.

Carrey’s disappearing act — part challenge, part spiritual hat tip, part need to be taken serious — turned a project already meta-weird with Kaufman colleagues and confidants playing themselves (Judd Hirsch, wrestler Jerry Lawler), into an identity fun house both hilarious as imitation and off-putting as a workplace.

Chris Smith’s terrific and terrifically funny look back is anchored by provocative set footage of the antics, captured by Kaufman’s former girlfriend Lynne Margulies and partner-in-pranking Bob Zmuda, and a wonderfully reflective on-camera interview with a now-rabbinically bearded, Zen-like Carrey. (One of the smartest things Smith does is realize that when he has an interview as honest and illuminating as Carrey’s, he doesn’t need anybody else.)

Catnip for comedy nerds and psychoanalysts, “Jim & Andy” works as both a vibrant raising-of-the-dead for the crazed, showbiz-piercing genius that was Kaufman — there’s plenty of footage from his performance-art career — and a peek into the mind of a massively talented, box office-busting comedy star at a self-doubting, turbulent time in his life. Whether you believe the two met briefly or not in some cosmic Method-meets-telepathy plane, the documentary is a captivating plunge into that realm of comedy where originality and homage fuse.