In 1890, Frank T. Hopkins and his mustang, Hidalgo, are part of Buffalo Bill's Wild West show, advertised as "the world's greatest endurance horse and rider." A famous long-distance racer, cowboy, and dispatch rider for the United States government, Hopkins is plagued by guilt for having carried a message to the 7th Cavalry Regiment authorizing the Wounded Knee Massacre of Lakota Sioux. He translates a futile request from another performer, Chief Eagle Horn, for Bill to help his nation’s mustangs that have been rounded up by the government to be eradicated.
Wealthy Sheikh Riyadh sends his attaché Aziz, accompanied by Rau Rasmussen, to challenge Hopkins and Hidalgo to enter the "Ocean of Fire": an annual 3,000-mile race across the Najd desert region for a $100,000 prize. The Sheikh is custodian of the al-Khamsa line, considered the greatest distance horses in the world, and traditionally the race has been restricted to pure-bred Arabian horses and Bedouin or Arab riders. Hopkins’ fellow performers raise his entrance fee, and he encounters unscrupulous English horse breeder Lady Anne Davenport. He meets Sheikh Riyadh, an admirer of the Wild West, who has promised his daughter Jazira as the fifth wife to the prince riding the Sheikh's horse Al-Hattal, should he win.
The race begins, and Hopkins and Hidalgo face grueling conditions and contempt for an "infidel" riding an "impure" horse, and survive sabotage and a sandstorm. Determined to live her own life, Jazira advises Hopkins on surviving in the desert, but they are discovered together in his tent. The Sheikh prepares to have Hopkins gelded as punishment, but his outcast nephew Katib raids the camp, seeking control of the al-Khamsa line. The prince flees on Al-Hattal, but Aziz steals the Sheikh’s family journal of horse breeding for Katib, who kidnaps Jazira and demands Al-Hattal as ransom.
Hopkins rescues Jazira, who recovers the journal. Journeying back to camp, Hopkins reveals that his mother was Lakota Sioux, deepening his guilt over his role at Wounded Knee. Jazira compares his relationship to his heritage with her desire to avoid wearing the veil, urging him not to "go through life hiding what God made you." Davenport bribes Hopkins to drop out of the race, but he declines her offer and her advances toward him. Unbeknownst to him, Davenport is in league with Katib; they plan to kill Hidalgo and steal Al-Hattal, allowing her mare to win the race and breed with the Sheikh’s horse.
Enduring a swarm of locusts, Hopkins remembers Jazira’s advice and he and Hidalgo resort to eating them. Although it is forbidden to help other riders, he saves his opponent Sakr from quicksand. Hopkins is ambushed by Katib and falls into a trap, severely injuring Hidalgo, and is rescued by Sakr. They fight off Katib's men, but Sakr is shot, and Hopkins kills Katib in one of his own traps. Hidalgo collapses, and Hopkins considers shooting him in mercy, but a vision of Lakota elders and his mother appears to him as he chants a prayer to Wakan Tanka.
The prince arrives and taunts Hopkins that the end of the race is in sight, and Hidalgo suddenly struggles upright. Riding bareback, Hopkins comes from behind to surpass Davenport's mare and the prince, winning the race. He befriends the Sheikh, giving him his revolver, and bids farewell to an unveiled Jazira, who calls him by his Lakota name, Blue Child. Returning to the United States, Frank uses his winnings to buy the mustangs from the government, releasing them into the wild and freeing Hidalgo to join them. An epilogue reveals that Hopkins went on to reportedly win 400 long-distance races and was an outspoken supporter for wild mustangs until his death in 1951, while Hidalgo's descendants live free in the wilderness of Oklahoma.
Viggo Mortensen as Frank Hopkins, a noted long-distance rider.
Zuleikha Robinson as Jazira, determined daughter of the Sheikh.
Omar Sharif as Sheikh Riyadh, an insightful leader. He owns and breeds Arabian horses of the Al Khamsa bloodline.
Louise Lombard as Lady Anne Davenport, British aristocrat who bets her horse against Hopkins.
Adam Alexi-Malle as Aziz, emissary and the Sheikh's attaché.
Saïd Taghmaoui as Prince Bin Al Reeh, the Sheikh's chosen racer who wishes to marry Jazira by force.
Silas Carson as Katib, Jazira's cousin and leader of a group of brigands.
Harsh Nayyar as Yusef
J.K. Simmons as William "Buffalo Bill" Cody
Adoni Maropis as Sakr, a falconer and one of Hopkins' fellow racers.
Victor Talmadge as Rau Rasmussen
Peter Mensah as Jaffa, Jazira's personal guard.
Joshua Wolf Coleman as The Kurd
Franky Mwangi as Slave Boy
Floyd Red Crow Westerman as Chief Eagle Horn, a member of Hopkins' Lakota nation, performing with him in the Wild West Show.
Elizabeth Berridge as Annie Oakley
C. Thomas Howell as Preston Webb
Todd Kimsey as Corporal at Wounded Knee
Malcolm McDowell as Major Davenport
David Midthunder as Black Coyote
based on the legend of the American distance rider Frank Hopkins and his mustang Hidalgo