Heihei is one dumb rooster-the village idiot, in fact. When the clueless chicken accidentally stows away on Moana's canoe, he lands a front-row seat for her epic journey.
The character of Heihei was present in the earliest versions of the story, though with an entirely different personality. Originally, Heihei was Chief Tui's loyal and cranky pet rooster and sidekick. He was portrayed as aggressive, proud, and judgmental, with most of his attempted comedy coming from these negative traits. The filmmakers felt this version of the character didn't work for the shifting story. Major discussion of scrapping Heihei's character from the film, entirely, had begun. Four months before animation of the film was to begin, John Lasseter assembled the team to decide the fate of Heihei.
One of the film's key story artists, David Derrick, had gotten sick and would be out of commission for two days. The filmmakers took this time to put focus into reworking Heihei's character to preserve his place in the movie. The result was a drastic change of Heihei's character, turning him into what co-director Ron Clements believes "might be the stupidest character in the history of Disney Animation". With Heihei as a semi-mindless animal, unaware of his surroundings, thus leading to varying situations (most of which are comical), he became a complication to Moana's journey, which in turn, furthered the story. An example of Heihei's new role was storyboarded and presented to John Lasseter, who enthusiastically exclaimed, "Yes, Heihei has been saved! He's in the movie!".
Heihei has been part of Moana's life since she was a toddler. He roams around the village mindlessly, often getting himself into unknowing trouble, only to be saved by the villagers. He seems to be viewed more as a member of the community rather than a pet, though some villagers believe his stupidity makes him a worthy choice for dinner. Moana, by the time of her teenaged years, believes there's more to Heihei than meets the eye - deep, deep down at the very least.
To put it simply, Heihei is incredibly stupid. He is oblivious of his surroundings and, as a result, places himself in varying degrees of danger without much notice. He is accident-prone and easily distracted, which makes him a complication in Moana's journey, though she'll work to protect her friend and loves him unconditionally, nevertheless.
Though his actions would strongly imply otherwise, Heihei has some level of awareness that is seen on rare occasions. For example, he was able to differentiate his island home to the blankness of the sea, and additionally deduced that he and Moana had ventured passed Motunui's reef (which is against the village law because of the dangers within the sea). This causes Heihei to go into panic and is perhaps the only instance in which he showed signs of mortality and fear. During the climax, he proved that he understood the importance of Te Fiti's heart to Moana, and actively risked his life to help her maintain it when it nearly falls into the ocean during the second battle with Te Ka.credit