An old legend tells of a fortune in gold hidden in the "Cañon del Oro", later called "The Lost Adams", guarded by the Apache spirits. A man named Adams is said to have found it when he was a young man, only to have the Indians capture and blind him after killing his companions. Years later, Marshal MacKenna (Gregory Peck), a one-time gold prospector himself, wounds an old Indian shaman named Prairie Dog (Eduardo Ciannelli) who tried to ambush him. Prairie Dog subsequently dies despite MacKenna's attending to him. MacKenna thereby comes into possession of a map that supposedly shows the way to the treasure. Though skeptical, he memorizes the directions before burning the map.
Mexican outlaw John Colorado (Omar Sharif) and his gang have been tracking Prairie Dog to get the map, all the while being chased by the U.S. Cavalry. They take shelter in the house of the old judge of the town of Hadleyburg, kill the judge and kidnap his daughter, Inga Bergmann (Camilla Sparv), to use as a hostage in case the cavalry catches up with them.
Colorado finds MacKenna digging a grave for Prairie Dog. When he sees that MacKenna has burned the map, he takes Mackenna captive, intending to force him to lead them to the gold. They return for the night to Colorado's secret hideout to be safe from both the cavalry and marauding Apaches, who are also seeking the gold. The gang is made up of outlaws, including Colorado's right-hand man, Sanchez (Keenan Wynn), and several Indians, among them a hulking Apache warrior named Hachita (Ted Cassidy) and a fiery Apache woman, Hesh-ke (Julie Newmar). Colorado and his companions feel vengeful towards MacKenna: he had previously run them out of the territory; and Hesh-ke and MacKenna were once lovers.
The next morning, Ben Baker (Eli Wallach), a gambler from the town of Hadleyburg, arrives with assorted townsmen who have caught "gold fever." They have learned about Colorado's plans, including of his hideout, when one of Colorado's men got drunk in town and said too much. Colorado is forced to allow them to join his party. The townsmen include two wandering Englishmen (Anthony Quayle and J. Robert Porter) who overheard Baker's conversation with the others; a newspaper editor, (Lee J. Cobb); a storekeeper, (Burgess Meredith); a preacher (Raymond Massey) who has convinced himself that God wants him to get a share of the gold and do great religious deeds with it; and blind Adams (Edward G. Robinson) of the legend himself. Colorado persuades old Adams to retell the story of how he discovered the canyon. The tale further raises the hopes of the gold-seekers, but later when MacKenna sneaks off and warns a few of them to return home, that they will just get themselves killed searching for gold that does not exist (he says the tale Adams told is just a story he tells to get free drinks), they hesitate. However when Colorado steps in and reveals that MacKenna shot Prairie Dog, the townsmen, who never liked MacKenna, are convinced to continue the quest.
The cavalry, led by the cunning Sergeant Tibbs (Telly Savalas), has been following Colorado's party closely, and has without knowing it camped just outside his hideout. The party bypasses the cavalry by an ingenious diversion, during which MacKenna tries unsuccessfully to escape with Inga. But shortly thereafter the cavalry ambushes the party at a water hole, and most of the non-core members of the gang are killed. The remaining gold hungers continue on their way, and as they near the canyon, MacKenna and Inga begin to fall in love. A jealous Hesh-Ke, who now wants MacKenna back, twice tries to kill Inga but both times he stops her.
The cavalry is continuing its pursuit, and Sergeant Tibbs periodically sends messengers back to his base to keep it informed of his whereabouts. Eventually, the patrol is whittled down to just Tibbs and two others. Tibbs kills them and persuades Colorado he should be allowed to join the gang. After another shoot-out with the Apaches and crossing dangerous river rapids, they reach "Shaking Rock", the location where, according to the map, the gold is. MacKenna tells Colorado they will see the canyon the next morning.
That night the two of them talk in almost a friendly way about what Colorado plans to do with his share of the gold. Later Tibbs tries to enlist MacKenna in a conspiracy against Colorado, but MacKenna wants no part of it. MacKenna tells Inga to be alert for any opportunity to escape. When she protests that she too wants some gold he tells her emphatically there is no gold, that he has just been bluffing. MacKenna and Inga embrace, with Hesh-ke looking on enviously. Hachita spends the night looking at the moon.
The next morning everyone is up and mounted before sunrise. When the first beam of sunlight shines down, it sets off an optical reaction that startles the horses. Then the shadow of the pinnacle of "Shaking Rock" starts to move. Watching this, MacKenna for the first time believes in the legend. The shadow eventually ends at a hidden passageway cutting into a mountainside. They ride through it and emerge on the other side.
They see below them a large vein of pure gold. As all race to the canyon floor, Hesh-ke tries to kill Inga, but Inga fights back and Hesh-ke falls to her death. Once on the floor, while Colorado and Tibbs celebrate their great fortune, MacKenna, realizing that Colorado does not intend to leave any of the party alive, tries to escape with Inga up the canyon wall. Tibbs is killed by Hachita and Colorado while stuffing his saddle bags with gold nuggets. Colorado then shoots at Hachita, but his gun is unloaded. Hachita tells him that during the night he took the bullets out of Colorado’s gun, as the spirits had told him to do, and that Colorado also has to be killed because he is not Apache. However Hachita turns his back on Colorado, who kills him with a knife he had earlier taken from Hesh-ke.
Colorado pursues MacKenna and Inga, catching up to them at an ancient Indian dwelling high up the cliff. They fight. Colorado has Hachita's tomahawk so is the early aggressor, and would kill MacKenna but for Inga's desperate intervention. MacKenna gains the advantage over Colorado with some punishing blows, rendering him helpless. At that moment the marauding Apaches, presumably having followed the party's tracks into the mountain, enter the canyon and shoot up at the three. The Apaches thunder down to the canyon floor, shouting excitedly. However, the noise and the pounding of the horses causes a rockfall which in turn causes the valley floor to buckle and quake. The Apaches flee, and the three survivors descend the cliff and scramble for horses, barely escaping the collapse of the canyon walls, which buries the gold beyond reach. This is followed by the crash of "Shaking Rock".
Stunned and exhausted, Colorado and MacKenna face each other. Colorado tells MacKenna to stay away from him. MacKenna tells Colorado to go far away and hide, that he will be coming after him. MacKenna and Inga ride off together. The camera tilts down to the left side of McKenna’s mount, which happens to be Sgt. Tibbs’ horse, its saddle bags stuffed with gold nuggets.
The original score and songs of the film were composed by Quincy Jones. The opening song, "Ole Turkey Buzzard", is a recurring background theme. It was sung by José Feliciano and was composed by Quincy Jones with lyrics by Freddie Douglas. José Feliciano also plays guitar and add vocals in many parts of the soundtrack and Spanish version of the theme song "Viejo Butre" for the Spanish-language edition of the movie.
The theme song was used on the Late Show with David Letterman in 2007 as a random running gag. A 13-second clip would be played after Letterman threw his blue index cards through the "glass" window behind his desk, and was often combined with a video clip of the turkey buzzard soaring in the sky during the movie's opening sequence. Letterman would gradually show increased mock irritation with the clip in discussions with bandleader Paul Shaffer, while at the same time calling it "exciting, moving, inspirational" and "stirring, haunting, beautiful". The running gag ultimately resulted in Feliciano making a guest appearance on the Late Show on October 16, 2007, singing a longer version of the song (with the buzzard video clip superimposed over him).
Mackenna's Gold was reviewed in The New York Times by Vincent Canby, who considered the film as an example of "stunning absurdity". He noted: "The structure of the movie is so loose that a narrator (Victor Jory) must be employed from time to time to explain the plot, as if it were a serial. Most surprising in a movie that obviously cost a good deal of money is the sloppy matching of exterior and studio photography with miniature work for special effects."
Although not well received by critics and audiences, Mackenna's Gold was released internationally to some success. The film was popular in the Soviet Union. Mackenna's Gold was first shown at the VIII Moscow International Film Festival in 1973, followed by a cinematic premiere in 1974. The film was viewed by 63 million people and now stands fourth in the all-time rating of a foreign film distribution in the Soviet Union. The title song "Old Turkey Buzzard" was dubbed with Russian lyrics by Leonid Derbenyov, a Russian poet and lyricist widely regarded as one of the stalwarts of 20th-century Soviet and Russian pop music. It was performed by then-popular Soviet singer Valery Obodzinsky.
Quincy Jones's score was nominated for, but did not win, a Grammy Award for best score from a motion picture.