Rikki-Tikki-Tavi shows signs of heroic behavior from his very first encounter with Nag and Nagina, the two cobras. Since he is not ready to fight two snakes at once, he instead backs off, and later defends Teddy from a smaller snake near the house:
Rikki-tikki's eyes grew red again, and he danced up to Karait with the peculiar rocking, swaying motion that he had inherited from his family... If Rikki-tikki had only known, he was doing a much more dangerous thing that fighting Nag, for Karait is so small, and can turn so quickly...
(Kipling, "Rikki-Tikki-Tavi," cs.cmu.edu)
Throughout the story, it is emphasized that Rikki-tikki is not a supernatural animal, but a normal mongoose with the physical gifts given to his species. That makes his willingness to fight with the deadly snakes an act of extreme heroism, since a bite from the cobras will kill him just as easily, and faster, than it would a human. Rikki-tikki's defense of his adopted family, with no thought to his own safety, is an example of altruistic heroism, brave acts done for others without concern for personal safety or reward.