In Devon, England, a thoroughbred horse is born, admired by young Albert Narracott. Much to the dismay of his mother, Rose, Albert's father, Ted, purchases the colt at an auction, where he was originally looking to buy a plough horse for his farm. The purchase is also in spite of his landlord, Lyons, who tried to outbid him for the colt. Albert names the horse Joey and devotes much of his time to training him. Albert teaches Joey to come when he whistles (like an owl's hoot) with his hands, all while his best friend Andrew Easton watches.
Ted doesn't have enough money for rent, and promises Lyons his money after Joey ploughs the field and they sell turnips from their harvest. Ted has a bad leg and is an alcoholic. Rose shows Albert his father's medals from the Second Boer War in South Africa, where Ted served with the Imperial Yeomanry. Ted was severely wounded in action in the war, and received the Distinguished Conduct Medal for bravery under fire. She gives him his father's regimental pennant, telling Albert that his father wasn't proud about what he did during the war, and that he had thrown away the flag and medals, which Rose saved and kept hidden. Albert trains Joey to haul the plough and, to the astonishment of incredulous neighbours, prepares a stony hillside field for a crop of turnips. A rainstorm wipes out the turnip field and, to pay overdue rental debts Ted sells Joey to Captain Nicholls at the start of World War I. Albert learns of the transaction too late, but the captain promises to take care of the horse and hopefully return Joey after the war. Albert tries to volunteer, but is too young to join the army. Albert ties his father's pennant to Joey's bridle before he leaves with the captain.
Joey is trained for military operations and deployed to France with Captain Nicholls. In France, Captain Nicholls is killed in a cavalry charge, and the Germans take control of the horse. Joey befriends Topthorn, a larger black horse he met during military training. The Germans use the two horses to pull an ambulance wagon in the care of German soldiers Gunther and his 14-year-old brother, Michael. Gunther gives Michael the pennant when Michael is assigned to the German front, then steals the horses and takes his brother with him. They hide in a windmill, planning on riding back home to Germany, but during the night, German soldiers find the AWOL brothers and execute them for desertion by firing squad.
The horses are found in the windmill by Emilie, a young French girl who suffers from an unspecified illness and is living with her grandfather, who owns the property. After a close call in which German soldiers take all the food and supplies from the property, the horses return to German hands when Emilie's grandfather allows her to ride Joey on her birthday and the German soldiers come back. The grandfather keeps the pennant.
The story shifts to Albert, who has now enlisted and is fighting alongside Andrew in the Second Battle of the Somme in 1918, under the command of Lyons's son David. 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 gas bombs explode, filling the trench with white fumes.
The horses are now used to pull German heavy artillery, causing Topthorn to die from exhaustion. Joey runs away into no-man's land and gets entangled in barbed wire. Both British and German soldiers spot Joey and try to call him to their respective sides. A brave British Geordie soldier, waving a white flag, arrives at Joey's side. A German soldier named Peter also comes over with wire cutters, and together they free Joey from the barbed wire. They flip a coin to decide where Joey goes; the British soldier wins and takes Joey back to the British camp.
Albert survives the gas attack, whereas Andrew does not, but Albert is temporarily blinded, with bandages covering his eyes. He is recuperating at a British medical camp when the Geordie soldier takes Joey into the medical camp looking for a veterinary surgeon. Meanwhile, Albert is told about the miracle horse back from no-man's land. The army doctor instructs Sgt. Fry to put Joey down due to his injuries, but when Fry is about to shoot, a soft whistle catches Joey's attention. Through the crowd gathered around, Albert is led over to Joey, again whistling, while Joey comes over to Albert.
Albert tells the army doctor, the Geordie soldier and the other soldiers that he raised Joey, and gives them the exact physical description of Joey, confirming his claim. The war ends and Albert's eyesight is restored, but only officers' horses will be shipped home. Joey and the others are to be auctioned off to the highest bidder. The soldiers gather funds together to buy Joey for Albert, but during a bidding war with a French butcher reaching 30 pounds, an older gentleman suddenly walks up, bids 100 pounds, and wins Joey. The man is Emilie's grandfather. It is implied that Emilie died, and after hearing about the miracle horse, her grandfather walks three hours to get Joey back for the sake of Emilie.
Albert pleads with Emilie's grandfather for the horse to no avail, but before leaving, the grandfather pulls out the pennant and asks Albert if it means anything to him. On being told it belonged to the lad's father, the grandfather has a change of heart, giving Albert back the flag and Joey, saying that it was what Emilie would have wanted. In the end, Albert rides Joey back to his family's farm and gives the pennant back to his father.