The self-loathing Charlie Kaufman is hired to write the screenplay adaptation of Susan Orlean’s The Orchid Thief. He is struggling with anxiety, social phobia, depression, and low self esteem. His twin brother, Donald, has moved into his house and is freeloading there. Donald decides to become a screenwriter like Charlie and attends one of Robert McKee’s famous seminars.

Charlie, who rejects formulaic scriptwriting, wants to ensure that his script is a faithful adaptation of The Orchid Thief, but comes to feel that the book does not have a usable narrative and is impossible to turn into a film, leaving him with a serious case of writer’s block. Already well past his deadline with Columbia Pictures, and despairing of writing his script with self-reference, Charlie travels to New York City to discuss the screenplay with Orlean directly. Too shy and socially awkward to speak with her upon arriving at her office, and after receiving the surprising news that Donald’s spec script for a cliché psychological thriller called The 3 is selling for six or seven figures, Charlie resorts to attending McKee’s seminar in New York and asks him for advice. Charlie ends up asking Donald to join him in New York to assist with the story structure.

Donald, who is confident socially, pretends to be Charlie and interviews Orlean, but finds her responses suspicious. He and Charlie follow Orlean to Florida, where she meets John Laroche, the orchid-stealing protagonist of her book and her secret lover. It is revealed that the Seminole wanted the ghost orchid to manufacture a mind-altering drug that causes fascination. Laroche introduces this drug to Orlean. After Laroche and Orlean catch Charlie observing them taking the drug and having sex, Orlean decides that Charlie must be killed to prevent him from exposing her adultery and drug use.

Orlean forces Charlie to drive to the swamp at gunpoint, where she intends to kill him. Charlie and Donald escape and hide in the swamp, where they resolve their differences. Laroche accidentally shoots Donald. Fleeing, Charlie and Donald drive off, but collide head-on with a ranger’s truck. Donald is ejected through the windshield and dies moments later; Charlie is saved by the airbag. He runs into the swamp to hide but is spotted by Laroche. Laroche is killed by an alligator before he can kill Charlie.

Orlean is arrested. Charlie reconciles with his mother as he calls to inform her of Donald’s death. He later tells his former love interest, Amelia, that he loves her; she responds that she loves him too. Charlie finishes the script, which ends with him announcing in a voice-over that the script is finished and that for the first time he is filled with hope.