The movie starts off with a Frank Hopkins and his horse, Hidalgo, running a long distance race; they catch up to a snooty 'gentleman', race him, and beat him. Frank is having a victory drink in the saloon when a young army officer gives him orders to take to a high officer who is watching an Indian reservation, Wounded Knee. Frank gets there, sees the Indians, but just takes the orders to the officer. The orders are to take the weapons away from the Indians and pretty much get them to fight so they can be shot. Hidalgo turns Frank back towards the reservation when he hears gunfire and when he gets there, every Indian is dead.
Eight months pass and Frank and Hidalgo are apart of Buffalo Bill's Wild West Show. Frank's a drunk who is introduced as the "Hero of Wounded Knee". At one point, Frank is asked by one of the Indians in the show to help him save the mustangs because the army wants to kill them all since they aren't pure bred and since they are wild.
After one show an Arabian man named Aziz and a British gentleman talk to Bill about his claim that Hidalgo is the greatest horse alive. Aziz's boss (Omar Sharif), the sheik, wants this claim to not be used anymore as he thinks his horse is the greatest. They offer Frank a challenge to race across the Arabian dessert to prove that Hidalgo is better. After some words of wisdom from Annie Oakley, Frank and Hidalgo set off for the Middle East.
On the ship they encounter Lady Anne Davenport, who says that her mare has to win the race so she can win breeding rights to the Sheik's stallion.
They arrive in the Middle East and Frank gets a servant who's punishment for stealing milk is to serve the "cowboy" during the race. The race begins with everyone racing like a bat out of hell, then they all slow down to a walk, and they walk, and they walk. Everyone keeps telling Frank that he should drop out. At one point a rider and his horse fall down a dune and the rider is forced to stab his horse. The rider riding the sheik's horse tells Frank it's against the rules to help his fellow riders. The sheik's rider gets to the first stop in first place and pays the persons guarding the well to not give Frank any water. When Frank gets there he is told there is no water to which he makes a comment about a group of soldiers guarding a dry well. He steals the water after trapping the guards under their tent. Soon after, a sand storm hits so he and Hidalgo have to take shelter in a ruin city.
Their water is now filled with sand. They finally reach the half way point, which entails a days rest. During this time, Lady Davenport offers 30% of the winnings if he pulls out of the race. He tells Hidalgo this and that's the end of that. Same night, Frank goes back to his tent to find the sheik's only daughter there; she tells Frank a few tips to keep him and his horse alive. While she's in there, her bodyguard named Jaffa and Aziz come in and think she's been naughty with Frank. As punishment he's cuffed to a pole and is told 'he'll have the same thing happen to him as what happens to stallions when they aren't useful for breeding'. Bout this time, raiders attack the camp and so Frank is trying to fend off the man who's trying to cut off his parts while everyone else minus Aziz is fighting. Aziz steals the sheik's book on how he breeds his horses. Frank finally is freed by the sheik's daughter who's eventually kidnapped while everyone is still fighting. The sheik and Frank figure out that Aziz knows where she and the book are so Frank beats it out of him. She's with the sheik's nephew who wants the sheik's horse. Frank, Aziz, and Jaffa take a horse to the nephew's city. After the trade is made, the nephew sees black on his hands after he pets the horse, wrong horse. They flee, but not before Jaffa is shot by Aziz who then is shot by Jaffa before he can kill her. Back at camp, the sheik thanks Frank. The race continues.
Lady Davenport and her group are traveling when they are "attacked" by the nephew. She tells the nephew to steal the sheik's horse, kill Hidalgo, and leave Frank to die in the desert so her mare can win the race. The nephew and his group chase Hidalgo and the sheik's horse. The sheik's horse gets away from them, but Hidalgo and Frank fall into a pit where Hidalgo gets a spear to the top of the leg, Frank cuts it out. He's then saved by a rider, who helps him get Hidalgo up. The nephew has a pair of cheetahs released and they attack. Hidalgo and the other rider's horse try to stomp them out of the way; Hidalgo succeeds. The other rider is then killed by the nephew, who turns his attention to Frank. They fight and it ends up with the nephew standing on one of his own traps. Frank gets his lasso out and ropes one of the spears that sticks up causing the nephew to fall in and be speared.
Hidalgo is about dead and Frank's about to shoot him when 'ghost warriors' appear. The sheik's rider mocks him, then Hidalgo gets all better. Lady Davenport's horse is well in the lead; the sheik's horse gains, with Frank in the back. He soon passes the mare and heads for the sheik's horse. Frank and Hidalgo win and literally head for the beach which is a few yards away.
The sheik's daughter and Frank talk, Frank and the sheik talk.
Some time later...
The army has a bunch of mustangs in a corral where they will be shot. Frank shows up and hands the officer an order that says to release all the horses cause they've been paid for. Frank used his winnings to buy them and set them free, keeping his promise to help his Indian friend from the beginning of the movie. Frank lets Hidalgo go free to run with the wild mustangs.