Craig Schwartz is an unemployed puppeteer and in a forlorn marriage with his pet-obsessed wife Lotte in New York City. He gains employment as a file clerk with LesterCorp, and develops an attraction to his co-worker Maxine Lund, but she does not return his affections.
One day while filing, Craig discovers a small door hidden behind some filing cabinets. He crawls through it into a tunnel, and suddenly drawn to its other side, where he finds himself in the mind of actor John Malkovich. After about 15 minutes, Craig is suddenly ejected, and falls back into the real world on the side of the New Jersey Turnpike. Craig shows Maxine the door which she initially shows no interest in but later comes up with the idea of selling the experience for profit, calling Craig to set up a business venture. Among those entering the portal is Lotte, and she becomes obsessed with it as it begins to erupt transgender desires. Immediately following this Lotte and Craig go to Dr. Lester’s home for dinner where Lotte finds a room filled with John Malkovich memorabilia – she brings this up to Craig who knows of no relationship between the two. Maxine later expresses interest in Lotte but only when inside Malkovich – manipulating Malkovich so that they have sex while Lotte is in his mind and the two continue to conspire further dates inside of Malkovich. Craig, forsaken by both women, locks Lotte in a cage and forces Lotte to set up a meeting with the intent of being John Malkovich during it.
Craig soon discovers that through his puppeteering skills he is able to exert some control over Malkovich and the actor immediately retaliates by disavowing his relationship with Maxine. Malkovich consults with his friend Charlie Sheen who disagrees with John’s notion to end the relationship with a ‘crazy witch summoning her dead ex-lover,’ nonetheless, Malkovich follows Maxine to work and discovers the door; entering it, he finds himself in a world where everyone looks like him and says only “Malkovich” before he is ejected. Malkovich demands Craig stop use of the door, but Craig refuses. Instead, Craig discovers he is able to indefinitely stay within Malkovich’s mind, and spends the next eight months there, during which he makes Malkovich into a world-class puppeteer and has him marry Maxine, who is pregnant.
Meanwhile, Lotte escapes confinement and warns Maxine of Craig taking her place during her last encounter with Malkovich but Maxine is now more attracted to Craig’s control over Malkovich. Lotte contacts Dr. Lester and confronts him about “being John Malkovich,” where he explains that the person at the end of the portal becomes “ripe” on turning 44, allowing for others to permanently occupy that host’s mind and obtain immortality through their consciousness jumping from body to body; after that point, the end of the doorway moves onto another host, a newborn child, and those entering it then will become trapped in that unformed mind. Lester and several of his elderly friends plan to occupy Malkovich from the age of 44 until Maxine’s own daughter ages to the same age. Lotte warns them about Craig’s current control of Malkovich, and with Malkovich’s 44th birthday soon approaching, Lester makes a deal with Maxine to get back at Craig. Lester’s group fakes Maxine’s kidnapping, and call Craig via Malkovich to demand he leave or they will kill Maxine, but Craig initially refuses. Lotte loses hope and attempts to kill Maxine at the doorway; they both fall through, falling into Malkovich’s shame-ridden subconscious before being ejected. Maxine pleads with Lotte that her child was from when Lotte had been in Malkovich’s mind, and Maxine had kept it to show her love for Lotte. The two cement their love for each other.
Craig comes to believe Maxine is in danger and voluntarily leaves Malkovich’s mind, which Lester and his friends then enter. Craig finds Maxine romantically engaged with Lotte, and decides to get revenge and reenters the door to take back Malkovich’s mind. However, too late, he finds that the end of the doorway has passed on, and Craig finds himself trapped in the mind of a newborn girl.
Seven years later, an elderly Malkovich tells Sheen about his plan to extend their lives via the door which leads to the mind of Emily, Maxine’s child and whom Craig is permanently trapped in, forced to watch Lotte and Maxine living happily together.