Plot
Craig Schwartz is an unemployed puppeteer in New York City, in a forlorn marriage with his pet-obsessed wife, Lotte. He finds work as a file clerk for the eccentric Dr. Lester in the Mertin-Flemmer building, on a floor between the 7th and 8th, where the ceiling is very low. He develops an attraction to co-worker Maxine Lund, who does not return his affections. While filing, Craig discovers a small hidden door. He crawls through it into an earthen tunnel and finds himself inside the mind of actor John Malkovich. After fifteen minutes, Craig is ejected, landing on the side of the New Jersey Turnpike. He tells Maxine about the door, and she realizes they can sell the experience for profit.
Lotte enters the portal, and, based on her experience being Malkovich, becomes fascinated with the idea of becoming a man. She and Craig visit Dr. Lester's home, where Lotte finds a room filled with Malkovich memorabilia. Maxine arranges a date with Malkovich while he is inhabited by Lotte. Lotte becomes smitten with Maxine, who reciprocates, but only when Lotte is inside Malkovich; Maxine manipulates him into having sex with her while Lotte is in his mind. Craig, forsaken by both women, locks Lotte in a cage and forces her to set up another tryst with Maxine. He inhabits Malkovich instead, and discovers that his puppeteering skills allow him some control over Malkovich's body.
The real Malkovich, disturbed by his loss of control, confides in his friend Charlie Sheen and becomes suspicious of Maxine. Malkovich follows her to the Mertin-Flemmer building, where she and Craig are charging customers to use the portal. After a heated argument with Craig, Malkovich enters the portal and finds himself in a world where everyone looks like him and only say "Malkovich". After he is ejected, Malkovich demands that Craig close the portal, but Craig refuses. Lotte is freed by her pet chimpanzee and warns Maxine that Craig is inhabiting Malkovich, but Maxine is attracted to Craig's ability to control him.
Lotte confronts Dr. Lester, who reveals that he is in fact Captain Mertin, who, having discovered the portal to a "vessel body" in the late 1800s, erected the Mertin-Flemmer building to conceal it. He has obtained immortality by moving from one body to the next, which becomes "ripe" on the host's 44th birthday, allowing him to take possession. If he is late, he would become trapped in a newborn body. Lester has invited a group of friends to join him in occupying Malkovich once he turns 44, and Lotte warns them that Craig has taken control. Craig discovers he can occupy Malkovich indefinitely. Inhabiting him over the next eight months, he makes Malkovich into a world-class puppeteer and marries Maxine, who is pregnant.
On Malkovich's 44th birthday, Lester and Lotte kidnap Maxine. They call to demand that Craig leave Malkovich, threatening to kill Maxine, but he hangs up. In desperation, Lotte decides to shoot Maxine, who escapes into the portal. Lotte pursues her through Malkovich's subconscious before they are both ejected. Maxine confesses that she kept her unborn child because it was conceived while Lotte was in Malkovich's mind, meaning that it is Lotte's child, too, and the women cement their love for each other. Craig, believing Maxine is still in danger, leaves Malkovich's mind, allowing Lester and his friends to enter. Discovering that Maxine has discarded him for Lotte, Craig swears to reenter the portal to take back Malkovich's mind.
Seven years later, an older Malkovich, now inhabited by multiple people, tells Sheen about Lester and his friends' plan to extend their lives via the portal, which now leads to the mind of Maxine's daughter, Emily. Meanwhile, Craig, having entered the portal too late to enter Malkovich, but too early to have any control over Emily, is permanently trapped inside her, forced to watch Lotte and Maxine live happily together.