After a fight, Joel Barish discovers that his girlfriend Clementine Kruczynski has had her memories of him erased by the New York City firm Lacuna. Heartbroken, he decides to undergo the same procedure. In preparation, he records a tape for Lacuna, recounting his memories of their volatile relationship.
The Lacuna employees work on Joel’s brain as he sleeps in his apartment so that he will wake up with no memory of the procedure. One employee, Patrick, leaves to see Clementine; since her procedure, he has been using Joel’s and Clementine’s memories as a guide for seducing her. While the procedure runs on Joel’s brain, technician Stan and secretary Mary party and have sex.
Joel re-experiences his memories of Clementine as they are erased, starting with their last fight. As he reaches earlier, happier memories, he realizes that he does not want to forget her. His mental projection of Clementine suggests that Joel hide her in memories that do not involve her. This halts the procedure, but Stan calls the Lacuna boss, Howard, who arrives and restarts it. Joel comes to his last remaining memory of Clementine: the day they first met, on a beach in Montauk. As the memory crumbles around them, Clementine tells Joel to meet her in Montauk.