'The Blue Castle' is a 1926 novel by Canadian author Lucy Maud Montgomery. The story takes place prior to World War I in the early 1920s in the fictional town of Deerwood, located in the Muskoka region of Ontario and based on the town of Bala, which Montgomery visited once.
Valancy Stirling is twenty-nine, unmarried, and has lived her entire life with her gossip-minded family who actively discourage her happiness. When Valancy is diagnosed with a terminal heart ailment, she realizes she has never been happy in her life, and rebels against her family. Valancy decides to move out of her mother's house and take a position as a housekeeper for a friend of hers who is now gravely ill, Cissy Gay. Cissy and Valancy share a room and start spending time with Barney Snaith, who the townspeople are convinced is a criminal.
This novel is considered one of L.M. Montgomery's few adult works of fiction, along with 'A Tangled Web', and is the only book she wrote that is entirely set outside of Prince Edward Island. It has grown in popularity since being republished in 1990.