Despite his misgivings, Andy leaves Barney in charge as acting Sheriff when he has to go to Centerville for the day. Returning to find Mayberry all quiet and peaceful, a relieved Andy congratulates Barney on a job well done - only to walk into the courthouse and discover total pandemonium! It seems that Deputy Fife has arrested almost half the town for minor infractions - including Opie, Aunt Bee, the Bank president and the Mayor! And since he wasn't sworn in as Justice of the Peace, Barney couldn't process anyone - so he simply stuffed them all into Mayberry's two tiny jail cells like sardines in a can!
Sheriff Taylor, of course, quickly dismisses all of the charges and sends everyone on their way. He tells Barney to keep his chin up, explaining that it was, after all, his first experience being Sheriff and that he learned a lot about what not to do. Although convinced, Barney soon learns that he's the laughingstock of the entire town. When he's made fun of and picked on almost constantly, the shattered deputy decides to quit the force. Even Hilda Mae can't change his mind. Realizing that most folks don't see how their "funnin'" is hurting him, Andy starts telling everyone that he's got to fire Barney because he can't have a deputy who no-one respects. His plan works perfectly! As Barney starts to turn in his gear, the townspeople begin filing into the jail - re-arresting themselves in support of the beleaguered deputy. When they praise him for upholding law and order in Mayberry, Barney feels vindicated and his confidence returns.