One day, a summer flood washes a young mongoose named Rikki-tikki-tavi away from his family. He's found and revived by a British family living in India. The family adopts the orphaned mongoose—or, more accurately, he decides to stick around. (Their bungalow is pretty swank.)
Naturally curious and adventurous, Rikki-tikki explores the family's garden the next day. There he meets a Darzee, a tailorbird who is mourning his baby bird's death at the hands (er, teeth) of Nag. Rikki-tikki asks who Nag is and is instantly introduced to the big, black cobra. He also meets Nag's wife Nagaina, so that's two cobras for the price of one. Sweet!
Having missed their chance at a surprise attack, the cobras just slither off, and Rikki-tikki goes to hang with Teddy, the British family's son. But Teddy gets a wee bit too close to the poisonous krait snake, forcing Rikki-tikki to fight it. Not that he wouldn't have anyway. That's what mongooses do, after all.
That night, Nag and Nagaina plan a sneak attack on the British family, but they haven't reckoned with Rikki-tikki. In the ensuing battle, Rikki-tikki kills Nag, saving the family but also really ticking off Nagaina. The next day, Rikki-tikki sets a plan into motion to get rid of the cobras once and for all. He has Darzee's wife act as bait to keep Nagaina occupied (classic move). Then he heads to the cobra's nests and goes berserker on the eggs.
But all doesn't go according to plan. Nagaina sets out to kill Teddy, forcing Rikki-tikki to bring one of her eggs as leverage. In the epic clash of mammal-versus-reptile, Nagaina manages to snatch up her egg and flees into her den. Rikki-tikki gives the old girl hot pursuit, while Darzee mourns the loss of Rikki-tikki. No one goes into a cobra's den and lives.
Except Rikki-tikki, of course. He exits all action-hero style, and the family can't praise him enough. He lives with the family from then on, protecting the garden from snakes.