Set in 1882 Salt Lake City, Utah Territory, the story follows Hazel Russon, a 20-year-old Mormon woman who dreams of playing the Tabernacle organ and building a monogamous life with Elijah Crowther, her childhood sweetheart. Elijah is serving as a missionary in England, and the two have sustained their bond through letters promising a future outside plural marriage, the Mormon practice in which men take multiple wives. Hazel struggles daily with panic attacks and intrusive thoughts she believes are spiritual failings.
Hazel's life fractures when Elder Crowther, one of the church's most powerful apostles and Elijah's father, summons her and announces that Elijah no longer wishes to pursue their attachment and has embraced plural marriage. He delivers what he calls a commandment from the Lord: Hazel is to marry Brother Jacob Manwaring, a man in the Twenty-First Ward, a local congregation, who already has three wives. Devastated by Elijah's apparent rejection and pressured by the teaching that a woman cannot enter God's highest kingdom without being sealed, or joined in eternal marriage, to a man holding church priesthood authority, Hazel agrees.
During a brief courtship, Jacob charms Hazel and holds her through a panic attack, promising to be her anchor. They are sealed for time and eternity, then travel by wagon to his home on the far edges of the valley. On the ride, Hazel learns that all of Jacob's wives live together in one house, contradicting Elder Crowther's implication of a separate home, and that Jacob does not own the piano she was promised.
The manor is imposing but choked by overgrown vines and neglect. Inside, Hazel meets the three wives: Prudence, a gentle, heavily pregnant woman; Flora, severe and religiously rigid; and Abigail, the first wife, a beautiful redhead whom Jacob calls Abby. None of them knew Jacob was bringing home a new bride. That first night, someone stands outside Hazel's door with a light, then vanishes without a sound.
The house is eerily silent and layered in dust. Prudence's young son, Edward, speaks of it as a living presence. In Jacob's private study, touching a black book of scripture sends a shock through Hazel's body. One evening, she hears the hymn "Come, Come, Ye Saints" from above and follows the sound to a hidden door in the wallpaper. Jacob catches her and warns her away from locked doors. Hazel begins having nightmares involving blood and Abigail's corpse. By day, furniture moves on its own and shadows slither across walls.
Behind the hidden door, Hazel discovers an attic containing a box piano. She plays and finds profound relief, but Flora warns her away. Later, Jacob offers to bring the piano downstairs, revealing he knew about it all along. That same night, a ghostly apparition resembling Abigail appears in Hazel's room. The family travels to Salt Lake for church, where Hazel encounters Elijah, returned from his mission. A federal agent confronts Jacob, threatening to expose his plural household under the Edmunds Anti-Polygamy Act, a federal law criminalizing polygamy.
Jacob decides to flee. Before leaving, he discovers Hazel's unsent love letter to Elijah and pins her against the wall by her throat, threatening to expose her for adultery if she tries to leave. He takes all the household money and disappears. That same evening, Prudence delivers her baby stillborn, and the household descends into grief.
Over the next two months, the wives struggle with dwindling resources. Hazel follows the ghost to Jacob's study, where it leads her to the scripture book containing a note in Jacob's handwriting: "What you bind on earth is bound in heaven" (159). Abigail reveals that Jacob had a second wife named Sariah who disappeared years ago, making Hazel the fifth wife. She warns that the house is a cage but refuses to elaborate. Hazel proposes taking in boarders.
The new boarder turns out to be Elijah. Hazel is furious but cannot turn away the money. She also discovers hidden letters in Jacob's desk: correspondence from her family and Elijah, all opened by Jacob and concealed. Her own letters home were never sent. Jacob intercepted all correspondence to isolate her.
Flora departs with her children after a bitter argument. Prudence goes missing, and Hazel and Elijah search for her through the night. Elijah reveals the truth: His father lied. Elijah never wanted to leave Hazel. Elder Crowther manipulated the situation to force a quick marriage before Elijah could return and suspected Jacob's involvement in Sariah's disappearance but never investigated. Hazel recognizes she does not need any man's authority for her salvation. She and Elijah confess their love and plan to escape.
Prudence returns, having ridden to find Jacob because she believes his presence will ease the household's burdens. Jacob arrives and immediately establishes dominance, forcing Hazel onto his lap to grope and kiss her in front of Elijah, who poses as a boarder under a false name. After Elijah retreats, the chandelier crashes down in the entryway, barely missing Hazel. She recognizes the ghost at the top of the stairs not as Abigail but as Sariah, the dead second wife.
Sariah's ghost touches Hazel's forehead, sending her into a vision of the past. Hazel learns that Sariah and Abigail were twin sisters, both sealed to Jacob after the church's prophet, Brigham Young, refused to perform the ceremony unless Jacob married both. She witnesses the jealousy Jacob cultivated between them. In a confrontation, Abigail shoved Sariah, who fell down the stairs and died. Abigail then performed a ritual binding Sariah's spirit to the house. Jacob discovered the scene and used the crime to control Abigail permanently.
Jacob confronts Hazel, revealing he knows the boarder is Elijah. When Hazel declares she is leaving, he drags her by the hair, locks her in the study, and goes after Elijah with a knife. Sariah's ghost summons Abigail, who picks the lock and frees Hazel. Together with Prudence, they lure Jacob back to the house. Abigail strikes him with a candlestick while a supernatural snake, a manifestation of Sariah's power, coils around his ankle from beneath the floorboards. Abigail takes his knife and slits his throat.
Sariah's ghost erupts in light and sets the house ablaze, destroying the structure that binds her spirit to the earth. Hazel races upstairs to rescue Edward, lowers him from a window to Elijah and Prudence, then jumps herself. Abigail staggers out, forced through the flames by Sariah's spirit. As the family rides away, Hazel sees Sariah at the end of the drive, clothed in brilliant white and smiling before disappearing. The hymn plays one final time from the ruins.
Four weeks later, the surviving wives meet at Flora's family farm. Flora believes Jacob and Abigail both died in the fire; in reality, Abigail has relocated to Oregon under a new identity. Prudence departs for the East to train as a midwife. Hazel and Elijah prepare to leave for San Francisco, unmarried and embracing an uncertain but freely chosen future. Hazel reflects that she will always have anxiety and panic attacks but no longer sees them as a spiritual failing. Her panics, her desires, and her defiance were never sins but the truest parts of herself.