In Milan in 1863, two lovers are at the height of ecstasy. The handsome captain, Giorgio, breaks their reverie by telling Clara that he is being transferred to a provincial military outpost. In the next scene, Giorgio is in the mess hall at the army camp with Colonel Ricci, the unit's commanding officer, and Dr. Tambourri, its physician. He thinks longingly of Clara and she thinks longingly of him. Giorgio's thoughts are interrupted by a bloodcurdling scream. The Colonel tells him not to worry; it's just Fosca, his sick cousin. Giorgio offers to lend her some of his books.
As he begins to adjust to the tedium of life at the outpost, the sensitive Giorgio feels increasingly out of place amongst the other men. He starts becoming friendly with the Doctor, who describes Fosca as having a nervous disorder. She frequently collapses into seizures, exposing her suffering and need for connection.
Fosca arrives after dinner to thank Giorgio for the books. When he suggests she keep a novel longer to meditate over it, she explains that she does not read to think or search for truth, but to live vicariously through the characters. She then goes off into a dark musing on her life. Giorgio awkwardly changes the subject, but when he observes a hearse pulling up, she is overtaken by a hysterical convulsion. Giorgio is stunned and appalled.
The following afternoon, the Colonel, the Doctor, Giorgio and Fosca go for a walk together. As they stroll through a castle's neglected garden, Giorgio politely engages her in conversation while mentally narrating a letter to Clara. When Fosca confesses that she feels no hope in her life, he tells her that "the only happiness that we can be certain of is love." Fosca is hurt and embarrassed, but recognizes that Giorgio, like herself, is different from others, and asks for his friendship.
Giorgio and Clara exchange letters about Fosca. Clara urges him to avoid her whenever possible. When Giorgio is preparing to take a five-day leave, Fosca shows up unexpectedly, dissolving into hysteria and begging him to return soon. Fosca is next seen reading, stone-faced, from a letter Giorgio has sent rejecting her feelings as he and Clara make love.
Upon Giorgio's return, Fosca reproaches him. She demands to know about his affair with Clara and learns that she is married. In a sharp exchange, they agree to sever all ties. Weeks go by with no contact between them, but just as he is beginning to think that he is finally free of Fosca, he is informed by the Doctor that she is dying. His rejection of her love has exacerbated her illness. Giorgio, whose job as a soldier is to save lives, must go and visit her sickbed. He reluctantly agrees.
He enters Fosca's chamber, and she implores him to lie beside her while she sleeps. At daybreak, Fosca asks him for a favor before he leaves: "Write a letter for me." He complies, but the letter she imagines is a fantasy one from Giorgio to herself. She is seized by another convulsive attack, and he hastens from the room.
The soldiers gossip about Giorgio and Fosca while playing pool. The Colonel thanks Giorgio for the kindness he has shown his cousin and explains her history. As a child, Fosca was doted on by her parents and once had illusions about her looks. When she was seventeen, the Colonel introduced her to an Austrian count named Ludovic. Fosca was taken with him, though she had her reservations. Once they were married, Ludovic took all of her family's money. Fosca eventually discovered that he had another wife and a child. When confronted, he smoothly admitted to his deception and vanished. It was then that Fosca first became ill. After her parents died, she went to live with the Colonel, who felt responsible for her circumstances.
Meanwhile, Clara has written Giorgio a letter addressing her approaching age, in which she admits her fear of losing love when she is old and no longer beautiful. Giorgio makes his way to a desolate mountain and is in the midst of reading when Fosca appears. After Giorgio lashes out at her in anger, she crumples and faints. He picks her up and carries her back in the rain.
The rain, the ordeal of getting Fosca back to camp and perhaps exposure to her contagious emotions have conspired to give Giorgio a fever. He falls into a slumber and dreams that Fosca is dragging him down into the grave. The Doctor sends him off to Milan on sick leave. As he boards the train, he is followed once again by Fosca. She apologizes for causing his sickness and promises to keep her distance for good. Giorgio pleads with her to give him up. She explains that this cannot happen. Her love is not a choice, it is who she is, and she would gladly die for him. Giorgio is finally moved by the force of her emotions. He takes her back to the outpost.
The Doctor warns Giorgio that he must stop seeing Fosca, that she threatens his mental and physical health. Giorgio requests to forgo his leave; he feels it his duty to stay and help her as much as he can. Back in Milan, Clara questions him jealously about Fosca. Giorgio asks Clara to leave her husband and start a new life with him, but as she has a child, she cannot.
During Christmas, Giorgio is told that he has been transferred back to military headquarters. Later on, he reads Clara's newest letter, in which she asks him to wait until her son is grown before planning a more serious commitment. Giorgio finds he no longer desires the carefully arranged, convenient affair that they shared. He puts her letter away.
Having discovered the letter Fosca dictated, the Colonel accuses Giorgio of leading her on and demands a duel. The Doctor attempts to mediate the two, but Giorgio insists on seeing her again. He realizes that he loves Fosca, for no one has ever truly loved him but her. That evening, he returns to Fosca's room, knowing that the physical act might very well kill her. They embrace, their passion consummated at last.
The duel takes place the following morning behind the castle. Giorgio shoots at the Colonel and lets out a shrill howl eerily reminiscent of Fosca's earlier outbursts.
Months later, Giorgio is in a hospital, dazed, recovering from a nervous breakdown. He is told that Fosca died shortly after their night together; the Colonel recovered from the wound. Giorgio begins reading from Fosca's last letter. Gradually her voice joins his, and together they look back on their revelations.