Two years previously, Tim Thomas (Will Smith), while carelessly sending a text message while driving, veers across the center line into oncoming traffic and causes a multi-car crash in which seven people die: six strangers and his fiancee, Sarah Jenson (Robinne Lee).
In a conscious bid for atonement, unable to live with what he did, Tim sets out to save the lives of seven good people by donating his own vital organs, a process that will be completed after his planned suicide. A year after the crash, having quit his job as an aeronautical engineer, Tim donates a lung lobe to his brother Ben (Michael Ealy), an IRS field agent. He steals his brother's federal IRS identification badge and credentials, puts his picture over Ben's, identifies himself by his brother's name, and uses Ben's privileges to check out the financial backgrounds of further potential candidates for his donations. In each case he "interviews" them first to determine if they are "good" people.
In one case, the director of a hospice nursing home facility seeks a six-month extension on his back taxes. Tim is unsure of the man's ethics, because he drives a BMW yet claims to be insolvent. To resolve the issue, Tim passionately asks a resident patient, an elderly bedridden woman, to tell him whether he is a "good man," only to discover that the man is punishing the woman for not eating by not allowing the nurses to bathe her.
Six months later, Tim donates part of his liver to a Child Protective Services social worker named Holly (Judyann Elder). He then finds George (Bill Smitrovich), a junior hockey coach and donates a kidney to him. He then donates bone marrow to a young boy named Nicholas (Quintin Kelley), opting to have no anesthesia during the procedure, an evident consequence of his desire for atonement. In each case he does not tell the people why he's doing what he's doing, despite being repeatedly asked.
Two weeks before he dies, he contacts Holly and asks if she knows anyone "in the system" who needs and deserves help but is too proud to ask for it. Holly suggests Connie Tepos (Elpidia Carrillo), who lives with her two kids and an abusive boyfriend, but can't afford to leave. When Tim arrives to "interview" her under the guise of dealing with the IRS, Connie is embarrassed and humiliated that he knows what's been going on. She defends her boyfriend, is offended by Tim's suggestion that she should leave with her kids, and kicks him out of her house. In the meantime, Tim moves out of his house and into a local motel, taking with him his pet box jellyfish—decidedly the most venomous creature on earth, with its sting causing death in three to five minutes. That night, after being beaten by her boyfriend again, Connie contacts Tim. He meets her, tells her not to be weak, and gives her the keys and directions to his beach house. She takes her two children and they move into the house. Then she reads a letter from Tim which includes the deed to the house, again giving no explanation, and asking for her to (1) respect his wishes, (2) not try to contact him, (3) not tell anyone how she got the house, and (4) "live life abundantly."
Tim's sixth candidate is Ezra Turner (Woody Harrelson), a blind telemarketer for a meat company, who plays the piano. Tim had called Ezra and harassed him at work weeks earlier, to see if he was quick to anger or was a "good" person. Ezra remains calm, humble, and teary-eyed, and later after observing him in a restaurant, Tim decides he is worthy.
Tim then contacts Emily Posa (Rosario Dawson), a self-employed and attractive wedding announcement/greeting card printer who has a congenital heart condition and rare blood type that has left her with only weeks to live. Tim "interviews" her at her home, again under the guise of an IRS investigation, and more or less stalks her at the hospital. But then he starts to spend time with her, walking her Great Dane, weeding her garden, and fixing her rare Heidelberg Windmill press. He visibly fights his affections for her, again seeking atonement for the death of his fiancée, but he slowly falls in love with her.
Tim's brother Ben finally tracks him down at Emily's house, demanding that Tim return his IRS credentials. After a passionate sexual interlude with Emily, and with Ben waiting outside her house, Tim disappears out the back door, leaving her sleeping. He returns on foot to the motel, first stopping by the hospital to ask the doctor if there is any chance that Emily will improve. Discovering that her condition has worsened and that she will likely die before a donated organ becomes available, he decides "it's time."
Tim then fills the motel bathtub with ice water to preserve his vital organs, calls 9-1-1 emergency and reports his own suicide, climbs into the tub, and releases his box jellyfish into the water with him. The jellyfish wraps its tentacles around Tim's arm, causing excruciating and horrific pain and suffering, but a quick death.
At the hospital, his best childhood friend Dan (Barry Pepper), though distraught over promising to see Tim's final wishes through, acts as executor of Tim's living will to ensure that his organs are donated to Emily and Ezra. Ezra receives Tim's corneas, which correct his blindness, and Emily receives his heart.
Afterward, Ben finds letters from Tim that he is to give to each person explaining why he did what he did. This leaves Emily heartbroken. Emily finds Ezra (now a school teacher) at his kid's choir concert at a park and stops him as he passes by. Having never met before, Emily is fixated on Ezra's eyes, knowing they belonged to Tim. Emily begins to break down, which clues Ezra in to who she is. When he says, "You must be Emily," she breaks into tears and they share a heartfelt embrace out of mutual respect, love, and adoration for Tim.