Anna Sasaki is a 12-year-old girl who lives in Sapporo with foster parents, Yoriko and her husband. One day at school she collapses from an asthma attack, so her parents send her to spend the summer with Setsu and Kiyomasa Oiwa, relatives of Yoriko, in Kushiro, a rural, seaside town where the air is clear.
Anna sees an abandoned mansion, dilapidated and overgrown, across a seaside marsh and wades across the marsh to investigate it. She looks around, wondering why it seems so familiar to her, but gets trapped there by the rising tide. Toichi, a taciturn old fisherman, rescues her with his rowboat. On the way back across the water, Anna sees the house for a moment in good repair and well-lit. When she returns to the Oiwa's, Setsu tells her that the mansion used to be a vacation home for some foreigners, but that it has been empty for a long time. That night and on other nights, Anna has a dream of seeing a blond girl in the mansion, having her hair brushed by an old woman.
On the night of the Tanabata festival, Anna discovers a rowboat by the shore and rows it across the marsh to the mansion, where she meets Marnie, the blond girl. Anna tells Marnie about her dreams, but Marnie assures Anna that she is not dreaming now. The two agree to keep their meeting secret, and they meet again on several evenings.
One evening, Marnie invites Anna to a party at the mansion. The house is filled with guests. Marnie disguises Anna as a local flower girl to get her into the party. While there, Anna sees Marnie dancing with a boy named Kazuhiko. Later some townspeople find Anna asleep by the post office. The next day, Anna returns to the mansion, but it appears abandoned and dilapidated again.
One week later, while sitting on the shore sketching in a sketchbook, Anna meets Hisako, an older woman who paints pictures of the marsh and the mansion. Hisako comments that Anna's sketches look like a girl whom she knew when she was young, that her name was Marnie and she used to live in the mansion. Hisako also tells Anna that the mansion is being renovated because someone is moving in. Anna runs to the mansion, where she meets a girl named Sayaka. Sayaka has discovered Marnie's diary hidden in the mansion. The diary includes an account of the party with the flower girl. Several pages are missing at the end of the diary.
The next day, Marnie reappears. Marnie tells Anna about how her parents are always traveling abroad, how they leave her in the mansion with her nanny and two maids, and how the nanny and maids abuse her physically and psychologically. Meanwhile, Sayaka has found the missing pages from Marnie's diary, which include passages about Kazuhiko and a nearby abandoned feed silo. Sayaka and her brother head for the silo, thinking Anna may be there, and find her unconscious and feverish along the path.
When Anna recovers from her fever, Sayaka shows her the missing pages and a painting Hisako gave to Marnie. They seek out Hisako, who tells them Marnie's story. Marnie eventually married Kazuhiko and had a daughter named Emily. Kazuhiko died while Emily was young; Marnie was institutionalized; and Emily was sent to boarding school. After Marnie was released, Emily blamed Marnie for abandoning her. Emily eventually ran away and had a daughter herself, but she and her husband were killed in a car accident when their daughter was one year old. Marnie tried to raise her granddaughter, but died herself a year later. The granddaughter was placed in foster care.
At the end of the summer, Yoriko goes to Kushiro to take Anna home. She gives Anna a photograph of the mansion and says it belonged to Anna's grandmother. When Anna sees Marnie's name written on the back, she realizes that she is Marnie's granddaughter