Just outside of Natchez, Mississippi, during the closing days of the American Civil War, Colonel John Henry Thomas, John Wayne and his company stage one final attack on a small unit of Confederate soldiers, only to be informed after a bloody defeat that the war had ended three days earlier at Appomattox Courthouse in Virginia. Saddened and weary, Thomas leads his men out west toward home with the intention of rounding up and selling wild horses in the Arizona and New Mexico Territories to compensate them for their loyalty, friendship, and war service.
Meanwhile, Confederate States Army soldiers led by Colonel James Langdon, Bruce Cabot feel the war has left them with no home, and they prepare to emigrate south to Mexico and serve as reinforcements to Emperor Maximilian, leader of the French intervention invasion of Mexico against the republican government of President Benito Juárez. Langdon torches his plantation home before he departs rather than seeing it fall into Northern carpetbaggers. At the same time, Thomas and the surviving members of his command meet up with Thomas' adopted Indian son, Blue Boy, Jan-Michael Vincent, and other members of his tribe from the Oklahoma and Indian Territories. Together, they round up a herd of 3,000 horses and take them south across the Rio Grande of the North for sale to Maximilian's representatives in Durango, Mexico, after refusing a lower offer from corrupt and greedy U.S. Army purchasing agents.
Halfway there, Blue Boy discovers tracks indicating that Mexican Comanchero bandits are planning an ambush on the group of Confederate travelers. Blue Boy and Thomas go to warn the emigrating Confederates and Thomas and Langdon meet. Despite their differences, the Americans - Northerners, Southerners, and Cherokee Indians - repel the group of Mexican bandits attacking the Confederate camp, with Thomas' former Union Army troopers saving the day. Col. Langdon thanks the Northerners by inviting them to celebrate at a Fourth of July party - "Southern style".
However, the former soldiers soon relive the war when a fight breaks out. They then split and go their separate ways. Meanwhile, Langdon's daughter Charlotte and Blue Boy have quickly fallen in love. Lee Meriwether
When Langdon's Southern company finally reaches their destination in Durango, they find that Emperor Maximilian's forces had been chased out days earlier, replaced by ragged Mexican Republican forces of President Juárez, under General Rojas, who imprisons them. Viewing the new foreigners as potential enemies, the Juárista general holds the Southerners hostage, offering to release them in exchange for Thomas' horses. After Langdon is sent to Thomas' camp with Rojas' demands, the reluctant American cowboys agree to pay the ransom to free their brethren. On the way to Durango, Thomas and his men are confronted by French cavalry. A battle erupts with the Americans coming out victorious. Thomas and his men bring the horses to town and pay the ransom for their former enemies.
The company of reunited Americans rides out of Durango to return to the USA, contemplating what song to listen to as they ride. They pass over "Dixie" and "Battle Hymn of the Republic" before settling on "Yankee Doodle." Charlotte and Blue Boy are seen as a couple, while both Thomas and Langdon laugh at how the Confederate colonel's daughter has cut Blue Boy's hair.