The film starts with a brief introduction featuring a bald eagle gliding over the homeland of the mustangs, which resembles several western US National Parks. There is then a scene showing the birth of a Dun Kiger Mustang, Spirit (voiced in his narrations by Matt Damon). Spirit soon grows into a stallion, and assumes the role of leader of the herd, whose duty it is to keep the herd safe. This is demonstrated when he saves two foals from a mountain lion.

Spirit is a courageous leader, but has a serious mischievous streak and a high sense of curiosity. Spotting a camp one night not far from his herd, the stallion is unable to control his curiosity and moves towards it, as he's never seen humans before. To Spirit's surprise, the humans (possibly wranglers) are vicious. After a long chase, he is captured and taken to a US cavalry post. During this time in the film, the army is fighting the Indian Wars and taking over the soon-to-be western United States. There he encounters, "The Colonel" (voiced by James Cromwell). The Colonel attempts to tame the mustang, but Spirit manages to outwit all who attempt to ride him. During this time, a Lakota named Little Creek (voiced by Daniel Studi) is also brought into the fort and held captive, through the night and day they become friends. Through a series of events, Little Creek and Spirit, along with several army horses, escape the post. Little Creek's own paint mare, Rain, meets them, along with other Indians who loosely capture Spirit.

After returning to the Lakota village, Little Creek ties Spirit and Rain together, much to Spirit's dismay. Rain willingly shows Spirit her world. Spirit begins to understand their ways and falls in love with the mare. His affections for Rain, however, do not soften his yearning to be free.

At the end of their time together Little Creek decides that Spirit should never be tamed and frees him. As Spirit asks Rain to come with him to his herd, a Cavalry Regiment led by the Colonel attacks and ransacks the Lakota village, killing many innocent natives. Rain is shot by the Colonel, knocking her into the river while Spirit knocks the colonel off his horse, saving Little Creek's life. Spirit dives into the river to try to rescue Rain, but is unsuccessful and they both plummet over a waterfall. Having both survived, Spirit comforts Rain on the riverbed as she is dying from her gun wound until cavalry scouts tear him away. After finding Rain critically injured just as Spirit is being led away, Little Creek vows to free the mustang once and for all in accordance with his life-debt; and follows the men after tending to his own mare.

Spirit and other stolen horses are loaded onto a train and taken to the work site of the Transcontinental Railroad where they are put to work pulling a locomotive engine up a mountain when attempts to tunnel have failed even with explosives. Spirit realizes that if the track extends along its present course it will infringe on his homeland. Spirit breaks free from the steam engine and causes it to fall down the steep hill where it collides with another locomotive, causing a boiler explosion which starts the camp and woods on fire. Little Creek appears, saves Spirit from the wildfire, and takes him to safety.

The next morning, Colonel and his men find Spirit and Little Creek. A climatic chase scene ensues on winding rock passages that lead to a canyon where the two again outsmart the Army. Spirit also makes a "freedom" jump which amazes The Colonel. The Colonel stops one of his men from shooting the two and exchanges nods of respect with Spirit before they part.

Spirit races back to the rebuilt Lakota village with Little Creek. Spirit finds Rain still alive, nursed back to health by the Indians. Little Creek decides to name the Kiger mustang "Spirit-Who-Could-Not-Be-Broken". Little Creek, knowing it's for the best, sets Spirit and Rain free. Eventually, the two horses joyfully meet up with Spirit's own herd, including his mother. Viewers then see the eagle as he flies up into clouds shaped like horses.