A group of old-timers that like to cause mischief are gathered round a sidewalk bench in front of the post office. One is chewing gum and flicks the gum wrapper carelessly onto the sidewalk. Unfortunately for him, littering is something you can get a citation for in Mayberry, and something Deputy Sheriff Barney Fife takes very seriously. Barney happens to see the gum wrapper fall and demands which of the men threw it. The men laugh at Barney taking it so seriously, but Barney is adamant that littering must be nipped in the bud before it escalates into something worse. Frustrated, the man throws the gum wrapper away in the nearest trash bin, but the others continue to tease and mock Barney for taking his job so seriously.
As Barney continues his patrol down the street, a large limousine pulls up in front of the post office. The men all rise and gather round the pretty vehicle, admiring it. The man from the post office pokes his head out the door to get a look as well, adding that it's the Governor's chauffeur that has stopped by to mail some letters on his way to pick up his boss. The men suddenly realize that the car is parked in the no-parking zone, clearly marked as such by two large signs, and decide to get Barney in trouble. They get his attention. Barney looks back, catches the car in the no-parking zone, and without hesitation begins to write out a ticket. The Governor's chauffer, as the men predicted, hurries out demanding to know what's going on. Barney tells him he's being cited for parking in a no parking zone. The chauffer informs him that the car belongs to the Governor, and Barney is stunned. For a moment, he hesitates, and stops writing the ticket. Then he sees the smug look on the chauffeur's face and the face of the men who set him up for this, and decides to do his duty regardless of recriminations, and issues the ticket. The chauffeur leaves, laughing to himself in disbelief. Barney demands the street be cleared of the crowd that gathered, and keeps up a tough pose until after the chauffeur and onlookers are gone. Then he hurries to the courthouse, distraught, to tell Andy what he has done.
Andy is shocked Barney actually wrote the ticket. However, when Barney starts defending himself before Andy has expressed an opinion one way or the other, Andy reassures him he has nothing to be ashamed of, and that he was doing his duty. Others may have let it slide, but Barney chose not to, and as far as Andy's concerned that was the right thing to do.
In the middle of this conversation, word of what Barney has done apparently filters through to Mayor Stoner through the local grapevine. He descends from his office into the courthouse in a flaming rage, demanding what sort of law enforcement agency tags the Governor's car when it's passing through town. Andy calmly but firmly tells him that the car was not passing through but parked in an obvious no-parking zone, and that Barney was doing his job to the letter. Mayor Stoner, however, doesn't care, and wants the ticket torn up immediately and a formal apology given to the Governor.
Andy sends Barney to the school crossing, so he can argue this out with the mayor in private, then tells the Mayor he flatly refuses to do what he wants. The Mayor takes it into his own hands, seizing the phone and calling up the Governor to tell him to tear up the ticket. He adds to Andy that the Governor is a personal friend, and that he has every right to call him up at random like this. Unfortunately, when the call gets through, the Governor has forgotten who Mayor Stoner is - abashed, he hands the phone to Andy without saying anything about it. Andy, put on the spot, begins to try to explain why Barney tagged the limousine. However, the Governor interrupts him, telling him he has nothing to be sorry for and that he was actually greatly impressed someone had the nerve to tag his car when his chauffeur made an error. Andy has the Governor repeat what he said, holding the phone so Mayor Stoner can hear, too. The Governor goes on to indicate that someone with spunk and guts enough to override privilege is someone he commends highly, and that he'd like to meet and personally congratulate Barney when he next travels through Mayberry. The Mayor is absolutely stunned, and Andy is very happy that the Governor was such a good sport about this. They thank the Governor and hang up. Andy warns the Mayor to not tell Barney of the visit, as he'd like to be the one to tell him. The Mayor, pleased by a prospect of having the Governor visit Mayberry, agrees and goes upstairs to prepare.
Andy goes out to tend to some other business. While the courthouse is empty, Otis Campbell, slobbering drunk as usual, bumbles into the courthouse. He claims it's his anniversary, but he's argued with his wife so he's going to have a long weekend at jail instead of celebrating at home with her. Barney comes in and tells Otis he's going to frisk him to make sure he's not sneaking any alcohol in. Otis agrees but then asks Barney if he can have an extra pillow first. Barney goes to get one for him. In the interval, Otis quickly takes out the bottle of hooch he has hidden in his coat and dumps it out the first place he can find, which happens to be the water crock. Barney returns with the pillow, but the telephone rings before he can search Otis. Otis goes into his cell and locks himself in, and Barney answers the phone.
It's Mayor Stoner on the other end, and he forgets Andy hasn't told Barney yet, and tells him to call him as soon as the Governor arrives so he can be there. After he hangs up, Barney is shocked and humiliated - remembering the Mayor's attitude about the incident earlier, he is not unjustly convinced the Governor is coming to give him a dressing-down, and perhaps even fire him, and Mayor Stoner wants to watch his public disgrace.
Barney complains to Otis about how it isn't fair that he was only doing his job, and the Mayor and Andy both seem in on this plot to make a laughingstock of him, like the men with the gum wrapper earlier were trying to do. As he complains, he takes several drinks from the water cooler, though Otis tries to stop him. Barney is too upset to pay attention to Otis - he tastes the hooch but thinks it just means the crock needs some cleaning. He continues to complain as he drinks, and slowly lose his sobriety as Otis watches in dismay. Finally, a soused Barney decides he is going to just quit on his own before he is fired, and won't be there when the Governor arrives. He staggers to the back room to pack and change clothes.
Andy comes in and calls for Barney, but gets no response. He asks Otis if he's seen Barney, and Otis nods and points to the back room. Noticing Otis looks upset, Andy goes over and calls to Barney again. Barney staggers out, still in uniform but wearing his civilian hat. Andy stares in shock, takes a close look at Barney, and realizes to his absolute horror that Barney is drunk. Barney slurs to Andy that he's leaving before the Governor can fuss at him and fire him, which Andy denies. It takes a while to penetrate Barney's brain, but Andy finally manages to get Barney to understand that the Governor was coming to shake his hand. Barney starts to cry, realizing he misjudged Andy and Mayor Stoner and being too drunk to handle this rationally. Andy asks Otis if he knows how Barney got drunk but Otis claims innocence. Knowing the Governor will be here in a couple hours, Andy drags Barney to the squad car and drives him home to sober him up, telling Otis to tell Mayor Stoner they'll be back as fast as possible.
At home, Andy has a difficult time getting the weeping and staggering Barney out of the car. He nearly falls several times. Finally, Andy succeeds in getting Barney to the back door, but Barney now refuses to go anywhere without reassurance from Andy that he is not a bad person and is liked. Andy drags him inside and starts his sobering regimen.
Mayor Stoner arrives in the courthouse to see if the Governor is there yet, and is extremely displeased Andy and Barney left without any indication when they'd be back, or explanation for their absence. The Mayor is terrified the Governor will get there before Andy and Barney do, and be upset - he takes several drinks from the water cooler to calm himself as well, also remarking in disgust the crock must be dirty for the water to be so sour. Like Barney, he ignores Otis' drunken attempts to stop him, and Otis gives up after a bit.
Barney, brought back to some sort of sobriety but with a massive hangover, is grilled by Andy on how he got drunk. Barney insists he never drank on purpose and he has no idea what happened. He walks himself through the last thing he remembers, and suddenly it hits him and Andy at the same time that there must be booze in the water cooler and that Otis is the only one who could have put it there. They hurry back to the courthouse to warn the Mayor, only to see the Governor's car parked outside. Inside, the Governor praises Barney, shakes his hand, and says he doesn't mind having to wait a few minutes. The Mayor is nowhere in sight. After thanking Barney, the Governor heads back to his car to continue on his way. Barney is happy but shyly embarrassed by the whole affair. Andy and Barney look for the Mayor, and find him in the very back room, unconscious and completely drunk. They try to wake him, but when he stands he just passes out again, on the floor. Both Andy and Barney drag him off to sober him up.
The next day, Andy sentences Otis to several more days in jail because of the offense of bringing Alcohol into the courthouse, and the further offense of spiking the water. Otis, now sober, admits he wasn't thinking straight. He goes to take a drink from the water cooler before he goes back into his cell, but is disgusted to find it's been cleaned and replaced with fresh water.