Tapu Koko is the guardian deity of Melemele Island. It watched Ash a couple times during his first day in Alola. After the battle with Skull Gang, he spotted it but no one else did. Later that night, it appeared again and
Ash Ketchum followed it.
Tapu Koko presented Ash with a Z-Ring which he accepted. Kapu-Kokeko's Electric Terrain is activated by its Ability Electric Surge.
Kapu-Kokeko is very fickle and even though it is called a guardian deity, it does not always help out the people of Melemele Island, but sometimes pulls pranks or inflicts punishments. Additionally, on rare occasions, it reportedly also gives mysterious gifts to humans it takes a liking to like the Z-Ring given to
Ash Ketchum.
The next day, it appeared at the Pokémon School and took Ash's hat. He quickly followed it into the forest where
Tapu Koko challenged Ash to a battle.
Tapu Koko is a Pokémon that is positively brimming with curiosity and ever since the olden days, there have been instances of it challenging islanders to Pokémon battles or to Alolan sumo wrestling matches.
Pikachu battled it and difference in power between the two was initially too big.
Tapu Koko then came and activated the Z-Ring and the Electric-Z on
Ash Ketchum's arm but he didn't have the slightest clue what he was supposed to do. He managed to fire off Sparking Gigavolt which
Tapu Koko was able to defend and then fled the battle.
Ash's Grand Trial Battle vs Hala
Tapu Koko kept a close eye on the battle but stayed hidden in the forest throughout the duration of the battle. For defeating the Melemele Island's Island King Hala and passing the Grand Trial,
Hala was about to give
Ash Ketchum a Fighting-Z but
Tapu Koko swept in and swapped it for an Electric-Z.
Hala said this was the first time Kapu-Kokeko has ever taken this much interest in a challenger.
Rematch Battle at the Pokémon School
After seeing the results of
Ash Ketchum and
Pikachu in the distance, it showed up at the Pokémon School and challenged them. Despite the training showing results ant their speed being raised 12 percent above normal,
Tapu Koko still proved to be more powerful and it defeated
Pikachu and knocked it off the cliff but it quickly rescued it before it got hurt from the fall.