Ten years after the worldwide pandemic of the deadly ALZ-113 virus (known as the Simian Flu), human civilization is completely destroyed following martial law, civil unrest and the economic collapse of every country in the world. Over 90% of the human population has died in the pandemic, while apes with genetically enhanced intelligence have started to build a civilization of their own.
Near the ruins of San Francisco, Caesar leads and governs an ape colony located in the Muir Woods. While walking through the forest, Caesar’s son Blue Eyes and his friend Ash encounter a human named Carver, who panics and shoots Ash, wounding him. Carver calls for the rest of his small party of armed survivors, led by a man named Malcolm, while Blue Eyes calls for the other apes. Caesar orders the humans to leave. The remaining humans in San Francisco, who are genetically immune to the virus, are living in a guarded and unfinished high-rise tower within the ruined city. Prompted by Koba, a scarred bonobo who holds a grudge against humans for his mistreatment, Caesar brings an army of apes to the city tower where he conveys the message that while the apes do not want war, they will fight to defend their home. He demands that the humans stay in their territory and states the apes will stay in theirs too.
Malcolm convinces his fellow leader Dreyfus to give him three days to reconcile with the apes to gain access to a hydroelectric dam in their territory, which could provide long-term power to the city. Dreyfus, distrustful of the apes, arms survivors using an abandoned armory. Malcolm then travels into the ape village, but is captured by gorilla guards, who bring him to Caesar. After a tense discussion, Caesar allows Malcolm to work on the dam’s generator, if they surrender their guns. As Malcolm, his wife Ellie and son Alexander work, they bond with the apes. Mutual distrust of both sides gradually subsides; the truce is endangered when Caesar’s infant son Milo discovers a shotgun smuggled in by Carver, but the two sides reconcile when Ellie offers to help treat Caesar’s ill wife Cornelia with antibiotics. Meanwhile, Koba discovers the armory and confronts Caesar, questioning his allegiance and taunting him over his “love” for humans. In response, Caesar severely beats Koba, but at the last moment refrains from killing him; adhering to his philosophy that “ape not kill ape”, Caesar hesitantly forgives Koba. The furious Koba then returns to the armory, where he steals an assault rifle and murders two human guards. Returning home, he secretly kills Carver, stealing his lighter and cap.
The dam is eventually repaired, restoring power to the city. During the celebration, Koba sets fire to the apes’ home, then, unseen to anyone else, shoots Caesar in the shoulder, causing him to fall from the settlement’s main tree. In the panic of the loss of the alpha and the fire, Koba takes charge, and having planted Carver’s cap at the scene of the shooting, urging the apes to fight against the humans. Malcolm’s group hides as Koba leads the apes into San Francisco. The apes plunder the armory and charge the tower’s gates. Despite heavy casualties, the apes breach the gates using a hijacked tank, overrun the tower and imprison all the humans as Dreyfus flees underground. When Ash refuses Koba’s orders to kill unarmed humans, citing Caesar’s teachings, Koba kills Ash and imprisons all those known to be loyal to Caesar.
Malcolm’s group finds Caesar barely alive and transport him to his former home in San Francisco. Caesar reveals to Malcolm that Koba shot him, realizing his notion that apes were better than humans was naïve and that apes can be as violent as humans. Malcolm leaves the group and heads to the city to find medical supplies for Caesar. While looking for medical supplies, Malcolm encounters Blue Eyes; disenchanted with Koba’s leadership, the young ape spares Malcolm’s life and returns to the house with him, where he reconciles with his father. Caesar grows nostalgic watching a video clip from his childhood of his former owner and father figure Will Rodman on his old camcorder as Malcolm learns of Caesar’s past. A plan is put into action: Blue Eyes returns to the tower and frees the caged humans and apes loyal to Caesar, then Malcolm leads the apes, unseen, into the tower from below. After accomplishing this, Malcolm encounters Dreyfus, who informs him that his men have made radio contact with military survivors at a base to the north, who are on their way to help fight the apes. Caesar confronts Koba at the top of the tower, but as they battle, Dreyfus detonates C-4 charges he has planted beneath the tower. The resulting explosion kills him and collapses part of the tower. Caesar overpowers Koba, with Koba hanging over the edge of the tower. Pleading for his life, Koba reminds Caesar that apes do not kill apes, but Caesar states that Koba is not an ape and lets him fall to his death.
Malcolm informs Caesar of the impending arrival of human military reinforcements and both lament the lost opportunity for peace. Caesar tells Malcolm that the humans will never forgive the apes for the war they started and advises him to leave with his family for safety as the two of them acknowledge their friendship. As Malcolm disappears into the shadows, Caesar stands before a kneeling mass of apes, awaiting the war to come.