Set in the small Ontario town of Deerwood, the story follows Valancy Stirling, a plain, timid, unmarried woman who wakes on the morning of her twenty-ninth birthday consumed by despair. She lives with her domineering mother, Mrs. Frederick Stirling, and their elderly relative Cousin Stickles in a joyless household governed by rigid routine and appearances. The extended Stirling clan, including various uncles, aunts, and her beautiful cousin Olive, has long dismissed Valancy as a hopeless old maid, subjecting her to relentless ridicule. Her only private refuge is her imaginary "Blue Castle," a fantasy palace she has retreated to since childhood, where she envisions herself as beautiful, beloved, and free.
Valancy has been experiencing a recurring pain around her heart. Dreading the fuss her family would create, she secretly visits Dr. Trent, a local heart specialist unaffiliated with the Stirlings' preferred physician. The examination is interrupted when Dr. Trent learns his son has been severely injured; he rushes off, forgetting Valancy entirely. Days later, a letter arrives diagnosing her with a fatal heart condition in its last stages. Dr. Trent states plainly that nothing can be done and that she has at most a year to live. Valancy hides the letter and absorbs the news in stunned silence.
Through a sleepless night, Valancy reviews her entire drab existence: childhood humiliations, forced apologies for things she never did, never once being chosen as a dance partner or bridesmaid. She realizes that fear has governed every moment of her life. At three in the morning, she resolves to stop pretending, stop obeying, and stop being afraid. She throws a jar of ancient potpourri out her window, symbolically breaking with the dead atmosphere of her old life.
The transformation is immediate. Valancy refuses her childhood nickname, declines the family's patent remedies, and announces she will switch churches. At a family dinner, she openly mocks Uncle Benjamin's stale riddles, comments on Aunt Isabel's appearance, and passionately defends Barney Snaith, a mysterious man who lives alone on an island in Lake Mistawis and is the subject of wild rumors in Deerwood. Valancy departs abruptly when a heart attack threatens, leaving her stunned relatives convinced she has lost her mind.
Valancy then learns from Roaring Abel Gay, a hard-drinking but good-natured carpenter, that his daughter Cissy is dying of tuberculosis, alone and neglected. Moved by compassion, Valancy offers to keep house for Abel and nurse Cissy. She packs her bag, tells her horrified mother she is "going to look for my Blue Castle" (56), and walks out. The Stirling clan adopts a policy of watchful waiting, hoping Cissy will die soon and Valancy will return.
At Abel's dilapidated farmhouse, Valancy finds genuine purpose for the first time. She tends to Cissy, who is grateful for companionship after years of shame. Cissy had become pregnant by a young man she met while working as a summer waitress; when he returned offering to marry her out of obligation rather than love, she refused, and the community shunned her. The two women develop a tender friendship, with Valancy reading aloud from the nature books of John Foster, a mysterious Canadian author whose writings about the woods have long stirred something deep in her. The Stirlings send emissaries to retrieve Valancy, but she refuses to leave, rallying against intimidation by recalling Foster's declaration that fear is "the original sin" (19).
Barney begins stopping by regularly, bringing fruit and flowers for Cissy and running errands for Valancy. She finds conversation with him effortless; he tells vivid stories of hoboing across Canada and spending two years in the Yukon, though he reveals nothing about his origins. One evening, Barney rescues Valancy from a drunken man at a rough backcountry dance. His battered old car runs out of gas on the way home, and they sit stranded for hours in the moonlit night. During this time, Valancy realizes with sudden certainty that she loves Barney completely, regardless of his past or reputation.
Cissy dies peacefully at sunrise. The Stirling clan attends the funeral hoping Valancy will return home, but she does not. That evening, Valancy waits for Barney at the garden gate and asks him directly to marry her, giving two reasons: She loves him, and she is dying, producing Dr. Trent's letter as evidence. Barney agrees, with conditions: She must never ask about his hidden past or ask to see his mail, and they must never pretend or lie to each other. Valancy adds her own condition: He must never refer to her heart or urge her to be careful. He acknowledges he is not in love with her but says he has "always thought you were a bit of a dear" (91). The next evening, they are married in a quiet ceremony.
Valancy informs her horrified family, who resolve to treat her as dead, and begins life on Barney's island. The small shack under two enormous pines, seen through the lilac mist of the lake, strikes Valancy as her Blue Castle made real. Through summer, autumn, winter, and into spring, she lives in complete freedom: swimming, canoeing, reading by firelight, skating on the frozen lake, and exploring the woods with Barney, who calls her "Moonlight." Her complexion clears, she gains weight, and her heart attacks diminish and then cease entirely, though she does not dwell on this.
The crisis comes one June evening when Valancy's shoe heel catches in a railroad switch as a train rounds the curve. Barney pulls her free just before the train passes. Valancy realizes the extreme terror should have killed her instantly if she truly had a fatal heart condition, yet she is unharmed. A dreadful suspicion takes root: Dr. Trent may have been wrong, and she has trapped Barney into a permanent marriage under false pretenses.
The next morning, Valancy visits Dr. Trent, who is horrified to discover he accidentally sent her a letter meant for another patient who actually had the fatal condition. Valancy had only pseudoangina, a non-fatal condition that has since resolved. Returning in despair, she encounters Dr. Redfern, the patent-medicine magnate whose products the Stirlings have used for years. He reveals that Barney is his son, Bernard Snaith Redfern, a multimillionaire's heir who left home eleven years ago after a broken engagement. The pearl necklace Valancy wears, which she assumed cost fifteen dollars, was purchased for fifteen thousand. Back at the Blue Castle, Valancy enters Barney's usually locked workroom and discovers galley proofs for a book titled
Wild Honey by John Foster, revealing that Barney is the beloved nature writer whose words changed her life. She writes Barney a farewell note, insisting she did not trick him and offering to facilitate a divorce, then leaves the note and the necklace on his desk and returns to her mother's house.
The next afternoon, Barney arrives at the Stirling house demanding to see Valancy. He recounts his life: a lonely childhood as Dr. Redfern's son, merciless bullying over his father's patent-medicine empire, a betrayal by a trusted friend who publicly lampooned the family business, and the shattering discovery that his fiancée Ethel Traverse valued only his money. These betrayals drove him into years of isolation, convinced no one could love him apart from his father's millions, until Valancy, who believed him penniless and disreputable, asked him to marry her out of pure love. He tells her she restored his faith and that the moment on the railroad tracks made him realize he loved her completely. Valancy, still disbelieving, says he is a good actor. Barney erupts in genuine fury, accusing her of being ashamed of his father's business just as Ethel was. This anger finally convinces Valancy his love is real. She calls him "darling," and they reconcile.
They plan to build a house near Montreal, spend summers on Mistawis, and travel the world. The Stirling clan, learning of Barney's wealth and fame, reverses course and fawns over Valancy. On a September evening, Barney and Valancy take a last look at the Blue Castle before departing on a honeymoon abroad. Valancy cries but smiles through her tears, knowing that no place in the world will ever possess the enchantment of her Blue Castle.