The Old West town of Calendar, Colorado, springs up almost overnight when clumsy, hotheaded Prudy Perkins (Joan Hackett) discovers gold in a freshly dug grave during a funeral. Her father Olly (Harry Morgan) becomes mayor of the new settlement. He and the other members of the town council bemoan the facts that the place has become a drunken round-the-clock free-for-all, and that to ship out all the gold they are mining, they must pay a hefty fee to the Danbys, a family of bandits who control the only shipping route out of town. Most people are too busy digging to take time out to be sheriff, and those who are willing to put down their shovels quickly die.
This changes with the arrival of Jason McCullough (James Garner), a calm and exceptionally competent man from "back east" who says he is only passing through town on his way to Australia. While in the town saloon, he sees young Joe Danby (Bruce Dern) gun down a man. Needing money after discovering the town's ruinous rate of inflation, McCullough demonstrates his uncanny firearms ability to the mayor and town council, and becomes the new sheriff. He breaks up a street brawl and while at the Perkins house meets Prudy under circumstances that are mortifying for her. McCullough arrests Joe and tosses him in the town's unfinished jail, which lacks bars for the cell doors and windows. McCullough keeps the dimwitted Joe imprisoned through the use of a chalk line, some dribbles of red paint, and applied psychology.
McCullough acquires a reluctant deputy in scruffy Jake (Jack Elam), previously known as the "town character". The arrest of Joe Danby ignites the wrath of the patriarch of the Danby family. While the rest of the town quiets down under McCullough's reign, Pa Danby (Walter Brennan) mounts various efforts to get Joe out of jail. None of them work, so he brings in a string of hired guns, who are equally unsuccessful. Meanwhile, Prudy spars romantically with McCullough, McCullough and Jake go on an unsuccessful search for gold. Bars are finally installed in the jail, with the dimwitted assistance of the aforementioned Joe.
Pa Danby summons a host of his relatives to launch an all-out assault. The sheriff's first impulse is simply to leave town and resume his trip to Australia, but when Prudy expresses her sincere approval of this sensible idea, he announces that it sounds cowardly and decides to stay. The rest of the townsfolk announce their disapproval of his new plan, and officially vote not to help in any way. Thus, the Danby clan rides in faced only by McCullough, Jake, and Prudy. After a lengthy gunfight, McCullough bluffs his way to victory using Joe as a hostage and the old cannon mounted in the center of town. As all the Danbys are marched off to jail, the supposedly unloaded cannon fires, smashing the town brothel and scattering the resident prostitutes and the four civic leaders.
Sheriff McCullough and Prudy get engaged. In a closing monologue, Jake breaks the film's fourth wall and directly informs the audience that they get married and McCullough goes on to become governor of the state of Colorado, never making it to Australia (although he reads about it a lot), while Jake becomes sheriff and "one of the most beloved characters in western folklore".
Support Your Local Sheriff! was the first producing effort by Garner and his Cherokee production company, completed on a "shoestring" budget of $750,000. Early in pre-production, Paramount Pictures threatened a lawsuit as the studio contended that the first scene was "lifted" from their musical Paint Your Wagon (1969) where a similar gold mine discovery is featured. Eventually, Garner was able to show where the original screenplay had found its source material, and the lawsuit went away.
Support Your Local Sheriff was considered a "bomb" as it did not do any business in its first week, with United Artists clamouring to pull the film. Garner challenged them to match a $10,000 stake to keep the film in one theatre for a week. The result was impressive as "word of mouth" increased attendance until there were crowds around the theatre by the end of the engagement. Support Your Local Sheriff was the 20th most popular film at the U. S. box office in 1969.
In 1971 director Burt Kennedy re-teamed with James Garner, Harry Morgan, and Jack Elam to make another western comedy, Support Your Local Gunfighter, with different characters but a similar comedic tone. Many of the original supporting cast re-appeared, as well.