Bowser and the Broodals, a family of anthropomorphic rabbits serving as his wedding planners, kidnap Princess Peach from the Mushroom Kingdom and take her aboard Bowser's airship, intent on forcibly marrying her. Mario attempts to rescue her but is thrown off the ship by Bowser's hat and falls into the neighboring Cap Kingdom. With Mario gone, Bowser stomps on Mario's cap and lets it drift into the ship's rear propellers, shredding it to pieces.
A piece of the hat is grabbed by Cappy, one of the Cap Kingdom's sentient hat-like creatures called Bonneters; he explains to Mario that Bowser also kidnapped his sister Tiara to be used as Peach's wedding tiara. Cappy joins Mario and takes the shape of Mario's cap, providing him with the ability to throw his cap and temporarily capture other creatures and objects and utilize their abilities. They travel to the nearby Cascade Kingdom, recover an airship called the Odyssey, and begin pursuing Bowser.
Mario and Cappy explore the various kingdoms to collect Power Moons to fuel the Odyssey and battle the Broodals, who steal items including a dress, a cake, and a bouquet from each kingdom to set up Bowser's wedding. Eventually, they catch up to Bowser in his own kingdom and defeat the Broodals in their Mecha-Broodal for good. However, Bowser subsequently departs for his wedding on the Moon.
Mario and Cappy fly the Odyssey to the Moon's surface and confront Bowser inside a Moon Kingdom cathedral. The two sides battle in a cavern, which Mario wins. He frees Peach and Tiara, but the cavern begins to collapse. Mario captures an unconscious Bowser and escapes to the surface with Peach and Tiara. After Peach thanks Mario for his help, Bowser regains consciousness and decides to properly propose to Peach, causing Mario to do the same in haste. Overwhelmed, Peach turns down their proposals. Peach, Cappy and Tiara board the Odyssey. The rivals are both broken until Peach tells Mario that it's time to go home. Mario boards the ship just in time, leaving Bowser stranded in the Moon Kingdom.
In the epilogue, Mario returns to the Mushroom Kingdom, where he discovers Peach has packed her bags and decided to take a vacation to all the kingdoms Mario and Cappy visited, this time out of her own free will.