Rikki tells Nagaina that he is not going to spare her egg and he will kill her.
The mongoose is the natural enemy of the snake. As soon as Rikki shows up, the cobras Nag and Nagaina immediately feel threatened. They know that Rikki is a danger to them.
Nag was thinking to himself, and watching the least little movement in the grass behind Rikki-tikki. He knew that mongooses in the garden meant death sooner or later for him and his family, but he wanted to get Rikki-tikki off his guard.
Nag tries to fight Rikki by targeting the family. This backfires because Rikki is quick and clever. Once he kills Nag he goes after Nagaina. First, he kills all of the little baby cobras in their shells. He leaves one to use as leverage.
When Nagaina learns what has happened she fixates on the one member of her family she has left, just as Rikki suspected she would. She begs Rikki to let her keep her last baby, telling him that she will go away and never come back if he just gives her the egg.
Rikki refuses the offer.
“Yes, you will go away, and you will never come back; for you will go to the rubbish-heap with Nag. Fight, widow! The big man has gone for his gun! Fight!''
Rikki is probably thinking that Nagaina is trying to trick him again. He forgets about the egg, though, and she grabs it and runs. He follows her—into her hole. The other animals assume that he is dead. You just don’t follow a cobra into her hole and be the one who comes out again.
Rikki does succeed though. In doing so, he has killed the last of the snakes and ensured that there will be no new ones. Nagaina was just trying to defend her family. It was possible that she was telling the truth about taking her baby and not coming back, but unlikely. Rikki could not take that chance.
The incident with the egg is a perfect example of how this story is not one of clear-cut heroes and villains. While we are tempted to root for the mongoose, Rikki kills innocent baby cobras in their shell. Nag and Nagaina do target the family and Rikki, but their actions are designed for self-preservation. Both sides have to defeat the other in order to survive.