On the Polynesian island of Motunui, the inhabitants worship the goddess Te Fiti, who brought life to the ocean, using a pounamu stone as her heart and the source of her power. Maui, the shapeshifting demigod and master of sailing, steals the heart to give humanity the power of creation. However, Te Fiti disintegrates, and Maui is attacked by Te Kā, a volcanic demon, losing both his magical giant fishhook and the heart to the depths.
A millennium later, Moana, daughter of Motunui's chief Tui, is chosen by the ocean to return the heart to Te Fiti. However, Tui arrives and takes Moana away, causing her to lose the heart. Tui and Moana's mother Sina try to keep her away from the ocean to prepare for her ascension as the island's chief. Years later, after Moana has grown older, a blight strikes the island, rotting the coconuts and dwindling the number of fish caught. Moana suggests going beyond the island's reef to find more fish, but Tui forbids it. Sina explains to Moana that Tui and his best friend tried going beyond the reef, but the latter perished. Moana and her pet pig Pua try conquering the reef but are overpowered by the ocean's tides and end up shipwrecked back on Motunui.
Moana's grandmother Tala shows her a secret cave, where a number of ships are hidden, revealing to Moana that their people used to be voyagers. Tala explains they stopped when Maui stole Te Fiti's heart and that Te Kā's darkness is poisoning the island, but it can be cured if Moana and Maui return the heart to Te Fiti, which she gives to Moana. Tala falls ill shortly after and dies, but not before encouraging Moana to go and fulfil her destiny.
Moana sets sail on one of the hidden camakau, accidentally accompanied by her dim-witted rooster Heihei. Moana is caught in a typhoon and shipwrecked on an island where she finds the stranded Maui, who traps her and steals the camakau, but Moana catches up to him with help from the ocean. She demands that Maui return the heart but he refuses. Maui is accompanied by a sentient "Mini-Maui" tattoo, acting as his conscience.
They are attacked by Kakamora—coconut-armored pirates—who seek to steal the heart, but Moana and Maui outwit them. Moana realises Maui is no longer a hero, and convinces him to redeem himself by returning the heart. Maui first needs to obtain his fishhook, which is located in Lalotai, the Realm of Monsters, and is in the possession of Tamatoa, a giant, greedy coconut crab. Moana enters Tamatoa's lair, using herself as live bait to distract him and allowing Maui to climb atop the crab and retrieve his fish hook. However, Maui discovers he cannot control his shapeshifting and loses self-confidence, revealing that his first tattoo was earned when his mortal parents rejected him. After reassurance from Moana, Maui teaches her the art of sailing and regains control of his powers.
The two arrive at Te Fiti's island, only to be attacked by Te Kā, who damages Maui's fishhook. Fearful he will lose his power, Maui abandons Moana, who tearfully asks the ocean to find someone else to restore the heart. The ocean obliges and takes the heart from Moana. Tala's spirit appears, inspiring Moana to find her true calling. Moana decides to fulfill her destiny, retrieves the heart, and sails back to confront Te Kā. Maui returns, convinced by his tattoo to change his mind, but his fishhook is destroyed by Te Kā. Moana discovers Te Fiti is missing, but realises Te Kā is Te Fiti without her heart. Moana restores Te Fiti's heart, transforming her back to normal; Te Fiti then heals the ocean and islands of Te Kā's poison. Maui apologizes to Te Fiti, who forgivingly restores his fishhook and goes into a deep sleep. Moana bids farewell to Maui, returning home where she reunites with her parents and takes up the role of chief, setting sail on a voyage, accompanied from afar by Maui (in a form of a giant hawk) and Tala (in the form of a manta ray).