In 1912, a teenage boy named Albert Narracott (Jeremy Irvine) from Devon, England, witnesses the birth of a Bay Thoroughbred foal and subsequently watches with admiration the growth of the young horse, galloping through the fields at his mother's side.
Much to the dismay of his mother Rose (Emily Watson), his father Ted (Peter Mullan) buys the colt at auction, despite a friend pointing out a more suitable plough horse for his farm. Desiring to spite his landlord Mr. Lyons (David Thewlis), and retain his pride, Ted bids higher and higher for the colt. The high cost of the horse at 30 guineas (£31.50) means he is unable to pay rent to Lyons, who threatens to take possession of the farm if the money is not paid by autumn.
Ted promises to meet the deadline, suggesting he could plough and plant a lower, rock-filled field with turnips. Albert names the horse Joey and devotes much time to training him. Albert's best friend, Andrew Easton (Matt Milne), watches as Albert teaches his colt many things, such as to come when he imitates the call of an owl by blowing through his cupped hands.
Ted, who has a bad leg from a war injury, is frequently shown drinking alcohol from a flask he carries. Rose shows Albert his father's medals from the Second Boer War in South Africa, where Ted served as a sergeant with the Imperial Yeomanry. Ted was severely wounded in action, and received the Distinguished Conduct Medal for bravery under fire. She gives Albert his father's regimental pennant, telling Albert that his father is not proud of what he did during the war, and that he had thrown the flag and medals away, though Rose saved and kept them hidden.
Albert trains Joey for the plough and, to his neighbours' astonishment, prepares a stony hillside field to plant with turnips. However, a heavy downpour destroys the turnip crop, so Ted, in order to pay the rent and without telling Albert, sells Joey to the young cavalry officer Captain James Nicholls (Tom Hiddleston) as the Great War gets underway.
Albert subsequently pleads with the officer and begs for him not to take the horse, but Nicholls can only promise that he will take care of Joey as his own horse and hopefully return him after the war. Albert tries to enlist in the army but is too young, and before the captain leaves with Joey, Albert ties his father's pennant to Joey's bridle.
Joey is trained for military operations and becomes attached to Topthorn, a black horse with whom he is trained for his military role, and the two horses become friends. The two horses are deployed to France and Flanders with a flying column under the command of Nicholls and Major Jamie Stewart (Benedict Cumberbatch), but cavalry charges are now hopelessly obsolete, a fact that becomes clear when Captain Nicholls and his fellow cavalrymen charge through a German encampment and although achieving initial success, are met with the concentrated firepower of emplaced machine guns. Nicholls is killed along with most of his fellow cavalrymen, and the Germans capture the horses.
On the German side a 14-year-old Michael (Leonard Carow) convinces a superior that the two horses are fit to pull an ambulance wagon, and he and his brother Gunther (David Kross) drive the horses. Gunther gives the pennant to Michael as a good-luck "charm" when he is assigned to the German front, but Gunther ignores an order to remain behind and await the call to a later position. Unable to persuade his brother to remain behind, he captures him from the column, on horseback, with Gunther riding Joey and Michael riding Topthorn.
Their goal is to ride to Italy, but they stop for the night to hide in a farm's windmill and are discovered by their fellow German soldiers. Their status as deserters is evident and they are shot by firing squad.
The following morning, a young orphaned French girl named Emilie (Céline Buckens), who lives at the farm with her grandfather (Niels Arestrup), finds the two horses inside the windmill and takes care of them. German soldiers arrive and confiscate all food and supplies from the property, but Emilie hides the horses in her bedroom to avoid them being taken by the Germans.
Emilie suffers from a disease that makes her bones fragile and is not allowed to ride the horses for fear of falling. Nonetheless, Emilie's Grandfather, for her birthday, allows her to ride Joey, and she gallops the horse up the hill adjacent to the farm. This proves to be a dreadful mistake, and when Emilie does not return immediately, Topthorn races off towards the hill, with the Grandfather following behind. He sees that she has run into the German soldiers who ransacked their farm earlier. The German soldiers take the horses, despite Emilie's protests. The Grandfather keeps the pennant.
Joey and Topthorn are put to work pulling German heavy artillery, an exhausting task which kills horses quickly, either by gunfire or exhaustion. They serve in this brutal task under care of Private Friedrich (Nicolas Bro), who loves horses and tries to help them survive.
By 1918, Albert has enlisted and is fighting alongside Andrew in the Second Battle of the Somme, under the command of Lyons's son David (Robert Emms). After a British charge into no-man's land, Albert, Andrew and other British soldiers miraculously make it across into a deserted German trench, where a gas bomb explodes, filling the trench with poison gas.
Joey and Topthorn have survived years of hard service in the German army, much longer than most horses, but Topthorn finally succumbs to exhaustion and dies. Friedrich is dragged away by other German soldiers, leaving Joey to face an oncoming tank. The horse escapes and runs into no-man's land, where he gallops through the devastated Somme battlefield and gets entangled in the barbed wire barriers.
From their respective trenches, both British and German soldiers spot Joey in the night mist, and although disbelieving at first that a horse could have survived the battle, a British soldier from South Shields, named Colin (Toby Kebbell), waves a white flag and crosses the no man's land, trying to free the horse and coax him to the British side. Peter (Hinnerk Schönemann), a German soldier from Düsseldorf, comes over with wire cutters, and together they free Joey from the barbed wire.
They flip a coin to decide who should take possession of the horse; Colin wins and guides Joey back to the British trench, now having formed an unexpected friendship with Peter.
Andrew has been killed by the gas attack, but Albert has survived, temporarily blinded and with bandages covering his eyes. While recuperating at a British medical camp, he hears about the "miraculous horse" rescued from no-man's land. The army doctor (Liam Cunningham) instructs Sgt. Fry (Eddie Marsan) to put Joey down, due to his injuries. But when Fry is about to shoot, Joey hears the owl call he learnt as a colt.
Albert is led through the troops to Joey, again sounding his call, and Joey hurries to meet his long-missed friend. Albert explains that he raised Joey, and with bandages still covering his eyes, gives an exact description of the horse's markings, confirming his claim. Joey is covered in mud, so the camp doctor at first dismisses Albert's statement, but he is astonished when soldiers wash away the grime, revealing the four white socks and diamond star on Joey's forehead.
The armistice – on the 11th hour of the 11th day of the 11th month of 1918 – that brings the end of the war coincides with Albert regaining his eyesight. When he learns that only officers' horses will be shipped home, he accepts funds from his fellow soldiers to purchase Joey at a scheduled highest-bidder auction, but finds himself losing a bidding war with a French butcher, reaching £30.
Then a bid of £100 is entered. The bidder is an older gentleman, Emilie's grandfather, who informs the butcher that if he is bid against, he will sell his coat and bid to £110 – and should he be bid against again, he will sell his farm and bid to £1,000. No other bid is placed, and the grandfather takes ownership of Joey, planning to return with him to his farm.
He tells Albert that Emilie has died, and after hearing about the miracle horse, he has walked three days to get Joey back, for the sake of his beloved granddaughter's memory. Albert pleads for the horse with Emilie's grandfather, who at first remains stoic.
The old man is surprised, however, when the horse chooses to return to Albert, and he subsequently presents Albert with the military pennant, asking him what it is. Albert's quick recognition of the pennant convinces the grandfather that Joey is indeed his horse, and that returning Joey to his care is a better tribute to the memory of Emilie.
Finally, Albert is seen returning with Joey to his family's farm, where he hugs his parents and returns the pennant to his father. The elder Narracott extends his hand to the boy, now a man and like him, a former soldier.