A courageous and adventurous mongoose named Rikki-tikki-tavi (so named for his famous chattering “war cry”) is swept away from his burrow by an intense summer flood. Rikki-tikki is carried through the forests of India until he reaches a bungalow in the Segowlee cantonment. Barely alive, he’s rescued by a British family, consisting of a husband and wife and their young son, Teddy. They brings Rikki-tikki inside and the mongoose entertains himself by exploring this new setting. The family is amused by the mongoose and they decide to let him stay with them. That night, Rikki-tikki climbs into bed with Teddy. Alice, Teddy’s mother, is initially concerned that her son is in bed with a wild animal, but her husband assures her that Teddy is safer with Rikki-tikki because mongooses are good at fighting snakes.

Rikki-tikki wakes the next morning and continues his exploration. In the garden outside, the mongoose meets two tailorbirds, Darzee and his wife. The two birds tell Rikki-tikki that they are sad because one of their babies fell out of their nest and was eaten by Nag. Rikki-tikki explains that he does not know who Nag is, and the two birds cower as Nag appears. Rikki-tikki is set upon by him and his wife Nagaini, two vicious cobras who live in the garden. The two cobras resent the British family that owns the garden, and they are enraged that they have welcomed a mongoose into their estate because mongooses are known to kill snakes. Nag and Nagaina try to kill Rikki-tikki, who is briefly frightened but soon summons his courage and remembers that it is a mongoose’s “business” to fight and eat snakes. The cobras reluctantly admit defeat and retreat to their hole. 

Teddy comes running outside to play with Rikki-tikki when the mongoose suddenly hears a tiny voice cry out, “Be careful. I am death!” Rikki-tikki locates the voice and realizes that a dusty brown snakeling named Karait is heading towards the young boy. Rikki-tikki advances on the snakeling, and Teddy and his parents watch as he fights and kills Karait. Teddy’s parents are overjoyed that their new visitor has saved their son and they welcome him into their home for the second time. 

That evening, Rikki-tikki meets Chuchundra, a muskrat who lives in the bungalow as well. Chuchundra alerts Rikki-Tikki-Tavi that Nag and Nagaina have arrived. Rikki-tikki creeps along the estate looking for his adversaries. He soon overhears Nag and Nagaina plotting to kill the entire family so that they can take over the bungalow for their hatchlings. The two snakes split up, and Nag hides in the family’s bathroom so that he can surprise and kill his victims. However, Rikki-tikki manages to sneak up on Nag and attack from above, fatally sinking his teeth into Nag’s hood. The commotion wakes Teddy’s father, who then storms in and shoots Nag with a shotgun.  

Rikki-tikki rises early the next morning because he knows that he must kill Nagaina and her eggs. He asks Darzee’s wife to create a diversion so that he can sneak into the cobra’s nest, where he destroys all but one egg. However, Nagaina soon abandons her pursuit of Darzee’s wife and enters the bungalow, where she threatens to bite Teddy while his parents watch helplessly. Rikki-tikki then uses the final egg to taunt and distract Nagaina so that Teddy’s parents can pull him to safety. Nagaina manages to get the egg from Rikki-tikki and retreats to her cobra hole. However, Rikki-tikki risks his life and follows her. Convinced that Rikki-tikki was killed, Darzee starts to eulogize the mongoose through song but is interrupted when he triumphantly emerges from the cobra hole and announces that he has killed Nagaina. Pleased with his own valor, Rikki-tikki pledges to always protect his new home and the narrator boasts that no snake would dare to show its face at the bungalow again.