In the magical land of Ingary, teenage Sophie knows she’s destined to fail in life because she’s the eldest of three children. So it’s no surprise to Sophie when, after her father dies, her stepmother Fanny sends the youngest daughter Martha (who’s destined to be successful) to apprentice with the witch Mrs. Fairfax, the middle sister Lettie to be an apprentice at the local bakery, and takes Sophie on as an apprentice in the family hat shop. Sophie is good at sewing and trimming hats, and the hat shop is soon doing very well. But Sophie grows increasingly shy and feels like an old lady, as she never has anyone to talk to. Finally, on May Day, Sophie works up her courage to go visit Lettie. The crowds are upsetting, and Sophie is terrified when a handsome man in a blue and silver suit offers to buy her a drink. At the bakery, Sophie is shocked: Lettie and Martha have switched places, and Martha insists that Fanny is exploiting Sophie.
A few weeks later, a grand lady who turns out to be the evil Witch of the Waste enters the hat shop, inexplicably says she doesn’t appreciate competition, and curses Sophie to become a 90-year-old woman. Since Sophie can’t tell anyone she’s under a spell, she decides to leave. She toddles out of Market Chipping, speaks kindly to a scarecrow, and finds a walking stick when she rescues a dog from some brambles. After nightfall, desperate for someplace to warm up, she spots a frightening sight: the moving castle that belongs to evil Wizard Howl, who supposedly eats young girls’ hearts. Figuring she’s safe because she’s old, Sophie shouts for the castle to stop and finds one door that opens. She tells Howl’s assistant, a teenage boy named Michael, that she needs Howl’s help and is prepared to wait for Howl all night. She spends the night by the fire and in the middle of the night, Howl’s fire demon, Calcifer, observes that Sophie is under a spell. The two strike a deal: if Sophie can break the contract between Howl and Calcifer that binds Calcifer to the hearth, then Calcifer will break the curse on Sophie. However, Calcifer can’t tell Sophie anything about the terms of the contract—she’ll have to figure it out.
In the morning, Sophie is shocked to discover that Howl is the young man who tried to buy her a drink on May Day. Since the castle is absolutely disgusting, Sophie decides to pose as a cleaning lady; this way, she can stick around and discover the terms of Calcifer and Howl’s contract. Fortunately, the castle is quite small: it’s actually Howl’s home in Porthaven, but the door can open to four different places (the moors, Porthaven, Kingsbury, and someplace mysterious). Over the next few days, as Sophie scrubs, she discovers that Howl is vain and arrogant. Calcifer and Michael do most of the work, while Howl spends his days out courting. Howl is also working hard to avoid being hired by the King to find two missing men, Prince Justin and Wizard Suliman—both of whom the Witch kidnapped recently. The scarecrow Sophie spoke to tries twice to enter the castle, but Calcifer and Howl tell it to go away.
Soon, Sophie discovers that Michael is dating Martha (who’s still posing as Lettie), while Howl is dating the real Lettie. Worried for Lettie, Sophie convinces Michael to take her to Mrs. Fairfax’s house in Upper Folding to warn Lettie. They take seven-league boots, hoping to get there before Howl—but Lettie is already visiting with Howl and looks very much in love when they arrive. Michael helps Mrs. Fairfax corral a dog, which she says keeps trying to bite Howl.
That afternoon, Michael asks Sophie for help with a spell. The spell gives instructions that seem impossible to complete, but Sophie suggests they try to accomplish the first instruction: catching a falling star. Though Sophie and Michael get close to catching a star, they’re unsuccessful. When Howl gets home later, sees the spell, and learns what Sophie and Michael did, he takes them both through the mysterious door into a land called Wales. There, he visits his sister, Megan, and her family. The “spell” is actually her son Neil’s English homework, and the spell Michael was supposed to work on is now with Neil’s English teacher, Miss Angorian. Miss Angorian turns out to be young and beautiful, and she reads what turns out to be a poem by John Donne. Howl flirts with her and when he returns to the castle, he reveals that the Witch put a spell on him. Now, it’s catching up—they’re just waiting for the impossible things in the poem to occur.
The following day, since the King wants to appoint Howl Royal Magician, Howl takes Sophie to badmouth him to the King. First, he takes Sophie to visit his old tutor, Mrs. Pentstemmon, to practice speaking to a powerful person. Mrs. Pentstemmon tells Sophie that Sophie has the magical power to “talk life” into things, such as her walking stick. She also tells Sophie to break Howl’s contract with Calcifer so that Howl doesn’t become evil; a contract with a fire demon is what made the Witch of the Waste go bad. Then, Sophie visits the king. She’s unsuccessful: the King appoints Howl Royal Magician and tasks him with finding Prince Justin. As Sophie tries to find her way back to the moving castle after this, she runs into the Witch—who’s just come from killing Mrs. Pentstemmon.
Michael is terrified of the Witch’s curse, but Howl is just upset about Mrs. Pentstemmon. However, Howl is also spending a lot of time in Wales, no doubt courting Miss Angorian—and spending so much time in the rain gives him an awful cold. He still insists on going to the funeral, however. While Howl is sleeping, someone knocks at the castle door and a greyhound enters. It turns into a man, says Lettie sent him to watch over Sophie, asks Sophie to not tell Howl, and then turns into an Irish Setter.
Howl goes to the funeral disguised as a dog—and comes home with the Witch in pursuit. Once he’s escaped her, he says they must move Calcifer and change where the castle’s doors open. He decides to buy the former hat shop in Market Chipping; they can sell flowers. Once the move is complete, the castle’s doors open onto Market Chipping, a rundown mansion, a field of flowers, and Wales. While everyone else is asleep that night, Sophie learns that Calcifer was once a falling star.
Running the flower shop is easy: Sophie and Michael collect flowers from outside the castle’s moving entrance and sell them in Market Chipping. However, Sophie isn’t happy. She becomes increasingly unhappy when the scarecrow tries to enter the flower shop, but it goes away when Sophie tells it to. That same day, the dog-man manages to turn back into a person momentarily and shares that Lettie knows Sophie is under a spell. Finally, Miss Angorian calls at the castle—but, jealous and annoyed, Sophie sends her away. By now, Sophie is in such a temper that when Howl comments on her new sheepdog, Sophie snaps that it’s a cursed man. Howl and Calcifer turn the dog back into a man named Percival; Michael is convinced he’s actually Prince Justin. To try to improve Sophie’s mood, Howl sends Sophie to kill weeds in front of the mansion with Percival. Percival implies that he didn’t actually get to Sophie in time to protect her from Howl’s charm—and Sophie discovers, to her dismay, that both Howl and Michael know she’s under a curse and have been trying to lift it. Howl insists Sophie is keeping the curse on herself, but Sophie is so enraged that she vows to leave the next day.
The next day is Midsummer Day, so Sophie spends her morning picking flowers and making garlands while Howl, who spent the night drinking, sleeps. Just as she prepares to leave around midday, Fanny, Martha, Mrs. Fairfax, and Lettie all show up—and they all know Sophie is cursed. Miss Angorian joins the party, but she soon goes outside to admire the flowers. Suddenly, Calcifer shouts that the Witch found Megan’s family, so Howl races out of bed to rescue them. Soon after, the scarecrow shows up, but Calcifer insists it means no harm. As the scarecrow enters, the Witch’s voice booms through the castle: she has Miss Angorian in the Waste, and Howl must come rescue her.
Fearing Howl won’t forgive her if his latest love dies, Sophie puts on the seven-league boots and hurries to the Waste. There, the Witch shows Sophie the perfect man she’s creating out of body parts from Wizard Suliman and Prince Justin; she just needs Howl’s head to complete her project. When Howl bursts in moments later with the scarecrow, the Witch disintegrates. As Howl and Sophie race back to the castle, Howl explains that Miss Angorian is the Witch’s fire demon, and she’s power hungry. As they enter the castle, Miss Angorian picks Calcifer out of the hearth and squeezes the black thing he’s attached to—it’s Howl’s heart. Howl faints. Sophie tells her stick to hit only Miss Angorian and scoops Calcifer up. She breaks the contract by telling him to live another thousand years, plucking him off of Howl’s heart, and putting the heart back into Howl. As she does this, she turns back into a teenager. When Howl comes to, he crumbles the Witch’s heart, causing Miss Angorian to disappear—and where the scarecrow and Percival were, Prince Justin and Wizard Suliman appear. Sophie and Howl decide to live “happily ever after,” and Calcifer returns to the hearth. He’s happy to stay, as long as he can come and go as he pleases.