The story has often been anthologized, and has been published more than once as a short book in its own right. The story was adapted as an animated short in 1965 and as a live-action feature film in the Soviet Union in 1975. The same year, animator Chuck Jones adapted the story for an animated TV special in the United States.
The story follows the experiences of a young mongoose named Rikki-Tikki-Tavi (for his chattering vocalizations) after he is adopted into a British family residing in India, as a pet and as protection against venomous snakes. After becoming acquainted with some of the other creatures inhabiting the garden, Rikki is warned of two cobras Nag and Nagaina, who are angered by the family's presence on their territory. Accordingly Nag enters the house's bathroom before dawn but is attacked by Rikki. The struggle that ensues awakens the human family and the father kills Nag with a double-barrelled shotgun.
Nagaina, grieving, attempts revenge against Rikki's human family. While Nagaina has been distracted by the female tailor bird, Rikki has destroyed the cobra's unhatched eggs, except for one with which he distracts Nagaina while the humans withdraw to safety. Nagaina recovers her egg, but is pursued by Rikki-Tikki to the cobras' underground nest, whence Rikki emerges later, declaring Nagaina's death. His subsequent rôle is to protect the family from any future intrusion by venomous snakes.