Mary and the Witch's Flower is a 2018 animation film starring Hana Sugisaki, Yûki Amami and Fumiyo Kohinata, directed by Hiromasa Yonebayashi, written by Riko Sakaguchi and Hiromasa Yonebayashi, based on The Little Broomstick by Mary Stewart and produced by Yoshiaki Nishimura.
In a strange facility on top of a cliff, a fire burns as workers struggle to control it. A red-haired girl slips away with a satchel slung on her wrist, but is quickly seen and followed. A group of workers transforms into watery, bird-like creatures, who pursue the girl in the air as she escapes via a flying broomstick.
However, a large, bright-blue explosion envelops the creatures, and the girl falls off the broomstick, her satchel opening upon impact. The small seeds inside drop to the forest floor, causing trees to rapidly grow, and young birds to mature to adulthood and fly away. The broomstick is also quickly swallowed up by the growing foliage.
Young Mary Smith moves into the British estate of her Great Aunt Charlotte ahead of her parents. The bored, friendless girl tries to make herself useful through chores, but she repeatedly creates messes in the process. A local boy named Peter teases her for both her clumsiness and her wild red hair, which she hates.
Tib and Gib, Peter's cats, lead Mary to some mysterious glowing flowers. Zebedee, the estate gardener, identifies the flowers as "fly-by-night"; legend has it that witches covet the flower for its magical power. The next day, Gib disappears and Mary follows Tib to go look for her. Tib leads her to a broomstick ensnared in a tree's roots. Mary frees the broomstick, but accidentally bursts a fly-by-night bud on it. The bud releases magical power in the form of a blue gelatinous substance, making the broomstick come to life and enabling Mary to ride it like a witch. The Little Broomstick whisks Mary and Tib away to a complex of buildings hidden in the clouds. Flanagan, a fox creature who looks after student's broomsticks, scolds her for crash-landing her broomstick and tells her she's at the Endor College for witches.
The headmistress Madam Mumblechook assumes Mary is a new pupil with Tib as her familiar, and takes her on a tour of the college. The tour reveals a campus with modern technology and conveniences, wherein witches take courses in the magic arts alongside fields of science such as chemistry. During the tour Madam introduces Mary to Doctor Dee, the College's renowned chemistry teacher. Mary finds herself able to perform advanced spells such as invisibility. Madam and Doctor Dee become convinced that Mary is a prodigy, because of her performance as well as her red hair, which turns out be a distinguishing feature among the best witches.
At Madam's office, Mary finds a spell book hidden behind a picture of fly-by-night. Mary admits that her magical ability comes from fly-by-night, and that Tib actually belongs to Peter. Madam's attitude to Mary suddenly changes, but she still lets Mary return home. The magic granted to Mary by the flower ends as the sun sets and Mary barely makes it home safely. That night, Madam sends a message to Mary informing her that she's kidnapped Peter, and demands that Mary turn the fly-by-night buds over to her. She and Tib fly back to Endor with the buds and Mary leaves the Little Broomstick by the school entrance. Madam and Doctor Dee imprison her and steal the buds, locking her in Doctor Dee's transformation spell lab. Mary finds Peter locked in the lab with her, and discovers Doctor Dee has been experimenting on animals transforming them into fantastic creatures, including Gib. In the spell book, Mary finds a spell that can undo all magic, and uses it to undo all the transformations and unlock the lab. As they try to escape, they find themselves cornered on a balcony, only for Flanagan to return the Little Broomstick, scolding Mary for leaving it lying around anywhere. They then try to escape, but Madam and Doctor Dee recapture Peter.
The Little Broomstick takes Mary to an isolated cottage. Within the cottage, Mary finds notes on transformation spells and a mirror that Great Aunt Charlotte uses to contact her. Charlotte reveals that the cottage was her previous home, and she used to be a red-haired pupil that excelled at Endor (the one from the introduction). But one day Charlotte found fly-by-night on the campus, leading Madam and Doctor Dee to obsessively pursue a project to use the flower to transform all humans into witches. When one of their experiments disastrously failed, Charlotte decided to escape Endor, taking the flower with her. Charlotte begs Mary to use her last buds to return home, but Mary vows to rescue Peter instead.
As Mary attempts to return to Endor, Madam chases her, demanding the spell book back. The book is stolen in the aerial pursuit and Mary falls onto the island where the lab is. The Little Broomstick breaks and the magic of the flower expires. Mary makes her way across the island where the lab is and finds Madam and Doctor Dee are trying to use the flower to transform Peter into a witch. The experiment fails again, leaving Peter trapped within a gelatinous monster that rampages across the lab, draining the magic of all in its path. Mary gets the spell book from Madam after she is drained and tries to break the enchantments on a canister to reach the last fly-by-night bud. If she can regain her magic she can undo the spell binding Peter. She fails to reach it but realizes Peter can use magic now, and takes Peter's hand from within the monster and gives him the book with the spell to undo magic, allowing him to activate it. It undoes the failed experiment as well as all of Madam and Doctor Dee's research relating to it. The lab is destroyed.
Mary awakens in the ruins of the lab, which has been completely grown over. Flanagan returns her broomstick to her, having repaired it, and scolds her for leaving her broomstick lying wherever she wants. The two take the Broomstick back home, but while flying, Peter sees a Witch's Flower bud in her hair. She throws it away, stating she doesn't need magic anymore. The last bud of the flower explodes in midair, no longer needed, presumably ending the Witch's Flower.
In the credits, Mary is shown to be back home, on her way to school with Peter. The Little Broomstick is shown leaning against the wall at the manor, home.