Mr. Peabody is a genius dog who has an adopted 7-year-old human son, Sherman. He tutors Sherman by traveling through history using a time machine called the WABAC, While they visit Marie Antoinette in Versailles during the French Revolution in 1789, the two get caught up in the chaos of the Reign of Terror. Mr. Peabody is sent to the guillotine by Maximilien Robespierre, but escapes with Sherman through the sewers of Paris.
After they return to the present, Sherman begins school but soon gets into a fight with classmate (and developing crush) Penny Peterson over things he knows about George Washington. Mr. Peabody is called in by a concerned Principal Purdy who informs Mr. Peabody that Sherman had bit Penny on the arm. He is also confronted by a Child Protective Services agent Ms. Grunion, who suggests that Sherman's behavior is due to his being raised by a dog. She informs Peabody that she will come to their home to investigate whether or not he is an unfit parent.
Mr. Peabody invites Penny and her upset parents over for a dinner party to reconcile before Ms. Grunion arrives. While Mr. Peabody entertains Penny's parents, the Petersons, Penny calls Sherman a liar for saying that he "knows" historical figures and factual things not taught in history class. Despite Peabody's warnings, Sherman shows Penny the WABAC. Penny pressures a defensive Sherman into taking her into the past, where she naively decides to marry King Tut in ancient Egypt. Sherman returns to the present to get Mr. Peabody's help. Mr. Peabody hypnotizes the Petersons and rescues Penny, with Sherman's help, after telling her the fate of a pharaoh's widow.
The WABAC runs out of power. Mr. Peabody is just able to get them to Renaissance Florence in 1508 where they meet Leonardo da Vinci. While Penny and Sherman explore da Vinci's attic, they find his flying machine. Penny goads Sherman into flying and piloting it, which he manages to do before crashing. Da Vinci is thrilled the device works, while Mr. Peabody remains upset that Sherman risked his safety and destroyed a historical artifact.
They again attempt to return to the present, but a black hole forces them into an emergency landing during the Trojan War. During a discussion aboard the WABAC, Sherman discovers that Ms. Grunion may separate him from Mr. Peabody if she finds sufficient cause to do so. Sherman, upset, runs off and joins the army of King Agamemnon in the Trojan Horse. During the final parts of the Trojan War, Penny is trapped inside the Horse as it rolls towards a cliff. Mr. Peabody rescues her, but seemingly dies during the attempt.
Sherman pilots the WABAC to a few minutes before they left in the present to get Mr. Peabody's help to fix everything. As Sherman and Penny try to explain the situation, Sherman's earlier self shows up. Mr. Peabody tries to conceal the presence of two Shermans from the Penny's parents, but then Ms. Grunion arrives. A second Mr. Peabody arrives from Ancient Troy. Ms. Grunion's attempt to collect both Shermans causes them to touch and begin to merge. Both Mr. Peabodys rush to assist, but they each merge back together, causing a cosmic shock wave by their paradox. Ms. Grunion grabs Sherman to take him away forcibly, hurting him. Mr. Peabody uncharacteristically bites Ms. Grunion in defense of Sherman. Ms. Grunion calls the police. Mr. Peabody, Penny, and Sherman race to the WABAC, but cannot time travel due to a rip in the space-time continuum caused by the merger of the cosmic doubles. Historical figures and objects from the past begin falling from the cosmic rip into the present.
Peabody crash-lands the WABAC in Grand Army Plaza at William Tecumseh Sherman's statue's base. Confused historical figures and police officers quickly surround them while the cosmic rip intensifies. Ms. Grunion calls in Animal Control to collect Mr. Peabody. Sherman explains that everything was his fault, but Ms. Grunion contends that it is all because a dog cannot raise a boy. Sherman challenges that if being a dog means being as loving and loyal as Mr. Peabody is, then he is proud to be a dog, too. Penny, her parents, the historical figures, and others all agree and show solidarity by proclaiming themselves "dogs." President George Washington is able to grant Peabody a presidential pardon which is supported by former Presidents Abraham Lincoln and Bill Clinton.
As Mr. Peabody, Leonardo da Vinci, Albert Einstein, Isaac Newton, and Agamemnon try to figure out how solve the time crisis, Sherman suggests that Mr. Peabody and himself travel into the future using the WABAC to undo the damage. The duo are able to to do just that, with Sherman demonstrating that he can competently pilot the WABAC after all. The rip draws back all the historical figures to their respective times, with a smitten General Agamemnon abducting Ms. Grunion and dragging her back to his own time as she vows revenge on Mr. Peabody.