Dan Gallagher (Michael Douglas) is a successful, happily married New York attorney living in Manhattan when he meets Alexandra "Alex" Forrest (Glenn Close), an editor for a publishing company, through business. While his wife, Beth (Anne Archer), and daughter, Ellen (Ellen Hamilton Latzen), are out of town for the weekend, he has an affair with Alex. Though he thought it was understood to be a simple fling, she begins clinging to him.
Dan stays on a second unplanned evening with Alex in which she persistently asked him over. When Dan tries to leave, she cuts her wrists in a suicide attempt. He helps her to bandage them and later leaves. He thinks the affair is forgotten, but she shows up at various places to see him. She waits at his office one day to apologize and invites him to a performance of Madame Butterfly, but he politely turns her down. She then continues to telephone until he tells his secretary that he will no longer take her calls. She then phones his home at all hours, and then confronts him claiming that she is pregnant and plans to keep the baby. Although he wants nothing to do with her, she argues that he must take responsibility. She shows up at his apartment (which is for sale) and meets Beth, feigning interest as a buyer. Later that night, he goes to her apartment to confront her, which results in a violent scuffle. In response, she replies that she will not be ignored.
Dan moves his family to Bedford, but this does not deter Alex. She has a tape recording delivered to him filled with verbal abuse. She stalks him in a parking garage, pours acid on his car, and follows him home one night to spy on him, Beth, and Ellen from the bushes in their yard; the sight of their family life literally makes her sick to her stomach. Her obsession escalates further. Dan approaches the police to apply for a restraining order against her (claiming that it is "for a client"), to which the lieutenant claims that he cannot violate her rights without probable cause, and that the "client" has to own up to his adultery.
At one point, while the Gallaghers are not home, Alex kills Ellen's pet rabbit, and puts it on their stove to boil. After this, Dan tells Beth of the affair and Alex's supposed pregnancy. Enraged, she demands him to leave. Before he goes, Dan calls Alex to tell her that Beth knows about the affair. Beth gets on the phone and warns Alex that if she persists, she (Beth) will kill her. Without Dan and Beth's knowledge, Alex picks up Ellen at school and takes her to an amusement park, buying her ice cream and taking her on a roller coaster. Beth panics when she realizes that she does not know where Ellen is. She drives around frantically searching and rear-ends a car stopped at an intersection. She is injured and hospitalized. Alex later takes Ellen home, asking her for a kiss on the cheek. Following Beth's release from the hospital, she forgives Dan and they return home.
Dan barges into Alex's apartment and attacks her, choking her and coming close to strangling her. He stops himself, but as he does, she lunges at him with a kitchen knife. He overpowers her, but puts the knife down and leaves, with Alex leaning against the kitchen counter, smiling. He approaches the police about having her arrested, and they start searching for her.
Beth prepares a bath for herself and Alex suddenly appears, again with the kitchen knife. She starts to explain her resentment of Beth, nervously fidgeting (which causes her to cut her own leg) and then attacks her. Dan hears the screaming, runs in, wrestles Alex into the bathtub, and seemingly drowns her. She suddenly emerges from the water, swinging the knife. Beth, who went searching for Dan's gun, shoots her in the chest, killing her. The final scene shows police cars outside the Gallaghers' house. As Dan finishes talking with the police, he walks inside, where Beth is waiting for him. They embrace and proceed upstairs as the camera focuses on a picture of them and Ellen.
Alex Forrest was originally scripted to commit suicide at the film's end by slashing her throat with the knife Dan had left on the counter, so as to make it appear that Dan had murdered her. After seeing her husband being taken away by police, Beth finds a revealing cassette tape that Alex sent Dan in which she threatened to commit suicide. Upon realizing Alex's intentions, Beth takes the tape to the police, which acquits Dan of the murder. The last scene shows, in flashback, Alex committing suicide by slashing her throat while listening to Madame Butterfly.
This resulted in a three-week reshoot for the action-filled sequence in the bathroom and Alex's death by gunshot. Her shooting by Beth juxtaposes the two characters, with Alex becoming the victim and Beth taking violent action to protect her family.
In the 2002 Special Edition DVD, Close comments that she had doubts re-shooting the film's ending, because she believed the character would "self-destruct and commit suicide". However, Close gave in on her concerns, and filmed the new sequence after having fought against the change for two weeks. The film was initially released in Japan with the original ending. The original ending also appeared on a special edition VHS and LaserDisc release by Paramount in 1992, and was included on the film's DVD release a decade later.