Question: is moana based on a legend?
Answer: The legend that comes closest to the story presented in Moana is Maui's discovery of Mahuika's, the fire goddess, secret fire. After learning about this secret, Maui visited the goddess and tricked her into giving it to him, much like how he does with Te Fiti's heart in Moana.