The movie opens with a shot of Nelson (Kiefer Sutherland), a medical student, saying, "Today is a good day to die." The movie then moves on to explain this statement as Nelson tries to convince Joe Hurley (William Baldwin), David Labraccio (Kevin Bacon), Randy Steckle (Oliver Platt), and Rachel Manus (Julia Roberts), four of his classmates, to help him conduct a dangerous experiment: Nelson wishes to experience clinical death for one minute before being brought back to life by emergency measures, saying he wants to see if there is anything beyond death. Nelson's classmates are extremely apprehensive about the idea, but after much arguing, the five students decide to go ahead with the experiment. Nelson is then "flatlined," and his experience in the "afterlife" is interspersed on-screen with his classmates' attempts to bring him back to life. Despite some difficulty, they are able to successfully resuscitate him. Describing later what he felt, Nelson says, "You can't break it down into specifics, but there is something there. It's comforting."
The success of the experiment prompts the others to do the same, each for their own reasons. Joe goes next, looking for little more than fame, and agrees with Nelson that there is post-death activity. David then argues that, as the atheist in the group and the experiment's control, he should go next. After David also experiences things that he cannot ascribe to his previous scientific viewpoint, Rachel insists on being the next one to be put under.
Almost immediately after each experiment, however, each participant starts to experience strange phenomena. Nelson sees his injured dog Champ and a little boy, who quickly progress from just appearing before him to stalking and assaulting him. Joe, an out of control playboy despite being engaged, starts seeing visions in TV sets of women whom he secretly videotaped while having sex with them. On a subway train, David suddenly sees a little girl who calls his name, insults him with schoolyard taunts, and then disappears. Nelson and Joe remain silent about what has happened to them, but during Rachel's experiment, David speaks up about his strange experiences. Eventually, he convinces the others to abort Rachel's experiment, but an electrical short almost prevents them from bringing her back.
David then explains what is happening to him: he remembers the little girl that is appearing to him as a girl that he bullied in school named Winnie Hicks (Kimberly Scott). This prompts Joe to speak up about his experiences as well. David then prods Nelson to do the same. Nelson complies and identifies his assailant as Billy Mahoney (Joshua Rudoy), a kid he used to pick on, but his description of the injuries to his face get Randy's attention, as that cannot be mere hallucination. Randy argues that what the others have said is impossible, but Nelson replies that they have experienced death and are, therefore, in uncharted territory. Nelson asserts, "Somehow we brought our sins back physically,... and they're pissed." David and the others then chastise Nelson for not speaking up sooner, as that equated to an unethical withholding of findings.
The team then moves on to dealing with what they have unleashed. After getting surrounded by ghosts of women using the same vacuous pickup lines on him that he used on them, Joe finds his fiancée Anne (Hope Davis) in his apartment. She reveals that she found his videotapes, and she is therefore leaving him; not for cheating on her, but for so cruelly violating the trust of so many women. Rachel is haunted by visions of her father, who committed suicide when she was five. Nelson attempts to confront Billy Mahoney head-on, only to be beaten down once again.
David, trying a different approach, finds where the adult Winnie Hicks, now a mother and wife, is currently living, and, accompanied by Nelson, drives out to ask for her forgiveness, hoping it will resolve David's long-time guilt and make his hallucinations disappear. At first Winnie tries to be polite, but she reveals that she has tried to forget about what happened when they were children, and she does not appreciate David coming and reopening those wounds. David continues trying to apologize, but, realizing that he is now just making the situation worse, he leaves. As he is going, though, Winnie calls to him, and with a tear in her eye, says, "Thank you." While this is happening, Nelson, who was waiting in the car, is once more attacked by Billy Mahoney. When David arrives, all he sees is Nelson alone on the floor struggling, and he snaps a terrified Nelson out of it.
When Nelson and David get back to town, Rachel, who saw another vision of her father in class, reveals to the others what is happening to her and sarcastically thanks Nelson for the "nightmare." An argument between the five then erupts. David finally calms everyone down and goes to take care of Rachel while instructing Joe and Randy to help Nelson find Billy Mahoney. David tries to console Rachel, and they eventually make love off-screen.
Nelson takes Randy and Joe to a cemetery. It is explained, through a flashback, that Nelson accidentally killed Billy (and fatally injured his dog Champ at the same time) while bullying him in school. Nelson becomes angry, screaming at the tombstone, "I thought I paid my dues!" since Nelson's life was ruined after the incident, at which he was separated from his family. He then says that David is right, that he can still make amends. Nelson gets in the car and drives off alone. Joe and Randy, having been stranded by Nelson, call David. David rushes out to pick them up, and they figure out what Nelson's plan is.
Meanwhile, Rachel, now alone, finally confronts her father and sees the truth of what happened when she was a child: though she blamed herself all these years for his death, he was actually addicted to heroin. Rachel and her father then have a tearful reconciliation which is interrupted when Nelson calls, apologizing for getting them all involved in the situation. He also admits to Rachel that he is going under one last time committing suicide by himself. Nelson rushes to the laboratory where the group has been conducting their experiments, injects himself with potassium, and dies. The others all show up moments later and try to resuscitate Nelson to no avail.
Meanwhile, in the afterworld, Nelson appears, first young and then old, switching places with Billy Mahoney; being killed as Billy was knocked out of a tree. Finally, after twelve minutes, the team gives up and lets Nelson go. While talking over Nelson's dead body, Rachel says that Nelson told her on the phone that he thought he deserved to die. David angrily disagrees, saying Nelson was just a child who had made a mistake. David puts the defibrillator paddles to Nelson again, and in the afterworld, Nelson suddenly gets up and is faced by a now smiling Billy. He waves goodbye and walks off with Champ into the light as Nelson, hearing voices calling to him, runs the other way. Back on the table, the group has successfully brought Nelson back to life. Nelson then whispers in David's ear, "It wasn't such a good day to die," and thanks them. NOTE: The film's depiction of cardiopulmonary resuscitation is commonly regarded as inaccurate. While defibrillation is of no use if a patient has truly flatlined, it is possible for a patient to be in ventricular fibrillation or pulseless ventricular tachycardia, and still be revived with use of paddles.(as per Wikipedia)