Joel Barish (Jim Carrey) is an emotionally withdrawn man and Clementine Kruczynski (Kate Winslet) is his girlfriend who is a dysfunctional free spirit. They are inexplicably attracted to each other despite their different personalities.
They do not realize it at the time, but they are former lovers now separated after two years together. After a nasty fight, Clementine has had her memories of their relationship erased from her mind. Upon learning this, Joel is devastated and goes to the doctor to have the same procedure of erasing her memories done. However, while unconscious, Joel has second thoughts and decides he wants to keep his memories of Clementine.
Much of the film takes place in Joel’s brain as he tries to find a way to preserve his memories of Clementine and two Lacuna techies Patrick (Elijah Wood) and Stan (Mark Ruffalo) try to erase the memories. We watch their love and courtship go in reverse. The memories are slowly erased while Joel tries his best to resist the procedure and hide inside his mind.
In separate and related story arcs, the employees of Lacuna Corporation are revealed to be more than peripheral characters in scenes which further show the harm caused by the memory-altering procedure. Mary (Kirsten Dunst) has had an affair with the married doctor, Dr. Howard Mierzwiak, who heads the company (Tom Wilkinson). She agreed to have the affair erased from her memory when his wife discovered the relationship.
Patrick who is lonely and socially inept, becomes fixated on Clementine and uses Joel’s personal mementos that he gave to Lacuna as part of the procedure in order to seduce Clementine. These romantic entanglements turn out to have a critical effect on the main story line of the relationship between Joel and Clementine.
Once Mary learns of the affair she has had with the doctor, she steals the company’s records and sends them to all of its clients. Thus Joel and Clementine both get to listen to their initial tape recordings at Lacuna, and afterwards realize that even if everything in life isn’t perfect, their relationship can still be worthwhile.