When a prank on fellow high-school student Clay Gephardt goes wrong, popular but rebellious Landon Carter is threatened with expulsion. His punishment is mandatory participation in various after-school activities, such as the drama club, where he is forced to interact with quiet, kind and bookish Jamie Sullivan, a girl he has known for many years but to whom he has rarely ever spoken. Their differing social statures leave them worlds apart, despite their close physical proximity.
When Landon has trouble learning his lines he asks Jamie for help. They begin practicing together at her house after school. At first Landon is only using Jamie for her help with the play, and treats her coldly when his other friends are around. But as he spends more and more time with her, he is surprised to find that she is far from the person he thought she was, and begins to question who he really wants to impress.
During the play, Jamie astounds Landon and the entire audience with her beauty and voice, and Landon kisses her on the stage. Afterwards, he tries to get closer to her, but she repeatedly rejects him. Soon thereafter, however, Landon's friends publicly humiliate Jamie by altering a photograph of her and placing her head on the body of a scantily clad woman. Landon angrily confronts his former friend, punching him and publicly siding with Jamie. Afterwards, Landon and Jamie begin a relationship in which Landon dedicates most of his time to her. He discovers that she has a wish list, and sets out to make all her ambitions come true, such as taking her to a state border so that she can stand on either side of the line and, thus, be in two places at once.
In the final stretch of the movie, Jamie confesses to Landon that she is afflicted by terminal leukemiaand has stopped responding to treatments. Landon gets upset at first, and Jamie tells him the reason she did not tell him is that she was moving on with her life and using the time she had left but then Landon happened and she fell in love with him.
Jamie's cancer gets worse, her father rushes her to the hospital where he meets Landon. Landon doesn't leave Jamie's side until her father practically has to pry him away. Jamie's father sits with Jamie and tells her that "If I've kept you too close, it's because I want to keep you longer."
Soon, word gets out about Jamie's illness. Eric, Landon's best friend, comes and tells him how sorry he is and that he did not understand. Other friends come and apologize too.
Later, Jamie gives Landon a book that was her mother's filled with quotes. Landon reads 1 Corinthians 13:4-8 along with her. Jamie then tells Landon that she believes that God sent him to her to help her through her illness and that he is her angel. He later learns that his estranged father is going to pay for private home care for Jamie. Landon shows up at his father's door and thanks him before breaking down in tears as his father hugs him.
Landon continues to fulfill various wishes on Jamie's list, such as building her a telescope so she can see a comet. Through this process, Landon and Jamie learn more about the nature of love. Landon is finally able to grant Jamie's top wish by marrying her in the same chapel her parents got married in. Landon narrates that they had a perfect summer together with more love than anybody could possibly know and that she died soon after. Landon himself becomes a better person through Jamie's memory, achieving the goals that he set out to do, like she did.
Four years later, Landon visits Jamie's father and shows that he is still a better person because of Jamie by informing her father that he has been accepted into medical school; prior to falling in love with Jamie, he had no plans for his future after high school. Jamie's father tells him that both he and his mother are proud of him and that Jamie would be too. Landon tells him that he is sorry he never granted Jamie's wish to witness a miracle. Jamie's father tells him that she did in fact witness one: it was him. Carrying that thought, Landon goes for a walk on the docks where he narrates saying that Jamie changed him forever and that while he misses her, he believes their love is like the wind: he can't see it, but will always feel it. The movie ends with Landon, looking at the sunset, smiling.