In the prologue, a group of feral cats named ThunderClan are battling against their rival, RiverClan, by a river for control over a place called Sunningrocks, that both Clans have equal claim to. Redtail, ThunderClan's deputy, soon realizes that ThunderClan is badly outnumbered so they have to retreat, but Tigerclaw is reluctant to allow RiverClan to celebrate over a win over territory so quickly. Redtail orders the battle patrol to retreat. Tigerclaw reluctantly follows the order, looking at the RiverClan cats with anger. Later, in the ThunderClan camp, Bluestar, leader of ThunderClan, is trying to seek answers from StarClan, troubled by that night's defeat. Spottedleaf, the medicine cat of ThunderClan, joins her, and Bluestar asks her of Mousefur's current state, for she's been wounded badly. Spottedleaf replies, saying that she is young and will heal quickly. Then, Spottedleaf receives a prophecy from StarClan, from a shooting star, echoing to Bluestar that "Fire alone can save our Clan."
The first chapter then starts out with a kittypet named Rusty, wandering into the woods after dreaming about hunting a mouse in the wild. He is briefly attacked by Graypaw, who is a ThunderClan apprentice, and who tells Rusty about Clan life. Unbeknownst to the two young cats, two warriors from ThunderClan watch them - Lionheart, Graypaw's mentor, and Bluestar, ThunderClan's leader. After they watch Rusty and Graypaw fight, Bluestar offers Rusty a chance to join their Clan of feral cats and train as an apprentice, due to the warrior shortage in ThunderClan. Rusty goes home to think it over, and Smudge, his kittypet friend, tells him that he shouldn't join and are shouldn't be trusted, although Rusty wants to. Smudge sees that he can't change his friend's mind and they decide to be with each other for one more morning.
The next day, Rusty meets Lionheart and another ThunderClan cat, Whitestorm, in the woods. Rusty then accepts Bluestar's offer. He travels to the ThunderClan camp, where most of the cats disagree with a kittypet joining their ranks. Longtail, who shows extreme opposition to Bluestar's decision to let Rusty join the Clan, taunts Rusty. Lionheart persuades Rusty to prove his loyalty and use in the Clan, so he fights Longtail in a battle of honor. Rusty wins the fight, but Longtail gets another grasp on Rusty--but on his collar. The collar snaps off; this is taken as an omen from StarClan that Rusty belongs in their Clan. Bluestar then renames Rusty with the apprentice name of Firepaw in the traditional Clan way, and appointed as a Clan apprentice. At this time, his mentor is not announced, so he trains with Ravenpaw and Graypaw and their mentors, Tigerclaw and Lionheart.
Firepaw soon learns that kittypets are thought to be soft and useless by most Clan-born cats, and Firepaw is a cat who has no "warrior blood". Despite being seen as inferior, he is slowly able to adjust to his new life. He grows up fast and trains hard to become a respected member of the Clan, hoping to earn full warrior status. On his first solo hunting assignment, Firepaw finds Yellowfang, a medicine cat who was exiled from ShadowClan. He leaps into a battle with her, because he knows that rogue cats are not tolerated in enemy territory. He doesn't kill Yellowfang out of pity--the old cat was starving. Instead, although he knew it was against the Warrior Code, he feeds her and eats the remains of the rabbit he had caught for her, in the process beraking the Warrior Code once more.
A ThunderClan patrol soon came along. Bluestar was in the lead, but surprisingly, she didn't seem mad at all over Firepaw. Instead, she takes Yellowfang into camp as a prisoner and announced to the Clan that for now, she would stay at camp. Firepaw also gains a mentor in the process to speed up all the apprentice training. His new mentor is Bluestar herself. For a small punishment for Firepaw, he is put in charge of nursing Yellowfang back to help. Many cats in ThunderClan distrust Yellowfang both because of her former Clan, and also because of a warning given at a Gathering by Brokenstar, claiming that a 'rogue cat' killed ShadowClan kits. He makes it clear that a cat had been driven from ShadowClan and that she should be killed as soon as any cat found her. Brokenstar also urges the Clans to keep a close eye on their kits. The cats rush back to the ThunderClan camp to accuse Yellowfang, but Bluestar says that they have no proof it was her and she will remain prisionor.
Firepaw's natural curiosity is aroused when he finds himself becoming suspicious of Tigerclaw, a senior warrior. Ravenpaw, Tigerclaw's apprentice, who witnessed the events at Sunningrocks, tells Firepaw that it was Tigerclaw, not Oakheart, who killed Redtail, most likely so he could become deputy. Tigerclaw suspects that his secret has been discovered and secures his position by making sure that no cats, not even his Clanmates, trust Ravenpaw. To protect his friend, Firepaw takes Ravenpaw to a new home with a loner named Barley, who lives in a barn outside of WindClan territory. When Ravenpaw asks what Firepaw would tell the Clan about him, Firepaw says that he would tell the Clan that he was dead, but later on, he tells Bluestar the truth. Bluestar says that he might be better off without the Clan.
In the midst of this, Spottedleaf is killed by a merciless death blow from Clawface, a warrior of ShadowClan in an attack in which two of Frostfur's kits are stolen. Firepaw is devastated, because although she was a medicine cat and therefore unable to take a mate, they both had developed a love for each other. Tigerclaw immediately blames Yellowfang for the disappearance of the kits and the death of Spottedleaf, because she was taken into the Clan as a ShadowClan prisoner. Yellowfang is also not present when the kits are discovered missing, therefore making Tigerclaw and the rest of the Clan even more suspicious of her. Bluestar intervenes and says that there is no proof that Yellowfang is at fault and refuses to blame her for it without proof. Tigerclaw also makes an assertion that Ravenpaw helped Yellowfang steal the kits, causing Frostfur to chase Ravenpaw out when he tried to check up on the other kits.
Firepaw is determined to prove Yellowfang innocent of the accusation that she had been stealing kits. He and Graypaw are sent to find the missing kits and rescue them from ShadowClan. With help from Yellowfang, who is found attempting to rescue them herself, and a ThunderClan patrol led by Whitestorm, they drive off the real kit snatcher, Brokenstar, from his position as ShadowClan leader. Brokenstar had intended to train the tiny kits early so he could have more warriors for his Clan, but this had been prevented.
After the battle, Firepaw and Graypaw are promoted to warriors, and receive warrior names - Fireheart and Graystripe. Just before his vigil is supposed to start, Fireheart tries to tell Bluestar about Tigerclaw's betrayal, but she silences him with reminding him about his vigil. The story ends as the two new warriors guard the camp until dawn.