In 1874, Bart and other black and Chinese workers are laying railroad tracks under the cruel supervision of Taggart and his white henchmen. Taggart suspects that quicksand lies under the tracks, so he sends Bart and his friend Charlie ahead by handcart to check. When they sink, Taggart pulls out the handcart but leaves the men to die. In retaliation, after Bart and Charlie pull themselves out of the muck, Bart knocks Taggart in the head with a shovel. Later, Taggart meets Hedley Lamarr, a corrupt politician with a financial interest in the railroad. Taggart explains that the railroad must be diverted through the town of Rock Ridge to avoid the quicksand, but both realize they must first get rid of the rightful owners of the land. To accomplish this, Hedley sends thugs to torment the Rock Ridge citizens, all of whom are named Johnson. After the town sheriff is murdered, their stores looted, crops destroyed, people stampeded and cattle raped, the citizens meet in the church to discuss the problem. The preacher encourages them to flee to safety, but Gabby Johnson makes an impassioned speech that Olson Johnson praises as “authentic frontier gibberish.” Convinced by the speech to stay and fight, the citizens wire Governor Lepetomane to send a new sheriff. Although Lepetomane, who is distracted by lust for his secretary, is eager to protect his job by helping Rock Ridge, his cohort, Hedley, schemes to turn the situation to his advantage. In his search for a sheriff, Hedley, who is looking for someone so offensive that the citizens will abandon the town, suggests Bart, who was about to be hanged for hitting Taggart. Lepetomane doubts that the black Bart is a suitable candidate, but Hedley convinces him that being the first governor to appoint a black sheriff is the act of a future President of the United States. Soon after, the duly appointed Bart arrives at Rock Ridge on a saddle designed by Gucci. Although the assembled townspeople were prepared to greet their new sheriff ceremoniously, they instead aim their guns at Bart when they realize he is not white. Thinking quickly, Bart points his gun at his own head and threatens to kill the “nigger” if they do not lay down their weapons. Lest he shoot himself, the sympathetic townspeople refrain from intervening, as Bart drags himself to the sheriff’s office at gunpoint. In a jail cell, Bart finds Jim, a drunk who is sleeping off a binge, and soon learns that he was formerly The Waco Kid, the fastest hand in the West, before declining into alcoholism. The next day, Bart attempts to befriend the citizens but returns to the office disheartened when an elderly woman shouts racial epithets at him. One night, while Taggart’s band of thugs are sitting around a campfire feeling the effects of eating beans, Taggart decides to send Mongo, an imbecilic, animal-like brute, to kill Bart. When the fearsome Mongo rides a steer into town, the citizens panic. Mongo is flattening saloon patrons with a piano, when Van Johnson runs to Bart for help. Heeding Jim’s warning that shooting Mongo will only make him mad, Bart proceeds to the bar dressed as a candygram delivery man and hands Mongo a box that explodes when he opens it. While he is stunned, Mongo is chained to a jail cell. Meanwhile, Hedley enlists Lili Von Shtupp, a famous dance hall singer, to seduce and abandon the sheriff. Lili invites Bart to her room after her performance at the Rock Ridge saloon, and proceeds to seduce him, but becomes enamored by his prowess. Later, when Bart returns later to the jail, Jim shows him that Hedley has sent a writ to release Mongo. However, the simple-minded giant chooses to stay with Bart, who was the first man to best him. When Mongo tells Bart and Jim that Hedley’s interest in Rock Ridge has to do with the “choo-choo,” they ride out to the railroad site. Taggart and his men threaten to kill Bart, but Jim intervenes by shooting all of their trigger fingers. Later, Hedley advertises for “heartless villains” to form an army to destroy Rock Ridge. After seeing Hedley’s poster, the townspeople want to flee, but Bart asks for twenty-four hours to devise a plan. The townspeople balk, but relent when he reminds them they would do it for actor Randolph Scott. Meanwhile, Nazis, motorcycle gangs, Arab cutthroats, Ku Klux Klansmen, Mexican banditos, and every kind of Western outlaw answer Hedley’s advertisement. To infiltrate the group, Bart and Jim disguise themselves in Klansmen’s robes, but Bart’s black hands give them away and they must run for their lives. That night, Bart directs the citizens and the railroad workers to build a replica of Rock Ridge three miles east of town that is so exact, the villains will destroy it instead of the real place. By dawn, they have built façades replicating all the buildings in Rock Ridge, but then realize they must also make duplicates of themselves. To provide time to make painted wooden cutouts of all the citizens, Bart, Jim and Mongo delay the outlaws’ arrival by building a tollbooth in the desert. When the army of outlaws reaches the tollgate, they are forced to return for dimes and then must pass through, one at a time. The outlaws eventually enter the false Rock Ridge and ruthlessly shoot it up, until Taggart kicks down a building façade and realizes that they have been duped. As a backup plan, Bart has laid dynamite in the false town. When it fails to detonate, Jim shoots the fuse, creating a spark. After the resulting explosion, the townspeople and workers engage the villains in hand-to-hand combat, while Lili distracts the Nazis with a German sing-along. As the fighting continues on the western street, a chorus of homosexual dancers rehearse a musical production number on a nearby movie studio soundstage. When the battle at Rock Ridge escalates and the combatants crash through the soundstage wall, the surprised male dancers join the fight and, in some cases, pair up with the cowboys. The fighting continues to spread to the studio commissary, where a pie fight commences, then onto the city street. Hedley, realizing his defeat, hails a taxi and takes refuge at Grauman’s Chinese Theatre in Hollywood, where the film, Blazing Saddles , is showing. Watching the movie, Hedley sees that Bart and Jim have followed him on horseback. Although Hedley gets away, Bart outdraws him in a shootout, and he dies on the sidewalk next to swashbuckling actor Douglas Fairbanks’ footprints. Bart and Jim then go inside the theater to watch the rest of the movie, where, onscreen, the grateful Rock Ridge citizens are asking Bart to stay. Bart, however, feels his work is done and vows to go wherever outlaws rule the West and people cry out for justice. Although the townspeople tell him in coarse terms exactly what they think of his florid speech, they wish him luck. As he leaves, Bart encounters Jim, and together they ride into the desert to a waiting limousine. After wranglers take their horses, they enter the vehicle and drive off into the sunset.