In the third season episode "Lawman Barney", Barney and Andy are trying to get rid of two farmers illegally selling produce on the side of the road. After running scared the entire episode Barney finally talks straight to them and makes them back down, something even Andy had failed to do.
Barney: Do you see this badge? It says that I'm sworn to uphold the law. Now that's what I mean to do and you fellas better respect it. Understand? It's just as simple as that. (Both men step up into Barney's face and stare him down.) Barney: ...you're both a lot bigger than I am, but this badge represents a lot of people who are a lot bigger than either one of you. Now, are you gonna get out of here? (Both men look at each other, then walk off without a word.)
In "The Sheriff Without a Gun," a group of bank robbers comes into town pretending to be a film crew and attempt to rob the bank at night. Barney falls for it initially, but when Andy walks in he realizes immediately that they're up to no good, because he spots that the lock has been forced at a glance. One of the robbers smirks and reminds him that Andy doesn't carry a gun, going to draw his own weapon.
Andy: Ah, that's right, I don't carry a gun. [beat] But my deputies do. [cut to Gomer and Floyd outside, carrying weapons]
In "Opie at the Carnival" a pair of crooked carnival barkers cheat Opie out of almost two months worth of allowance by giving him a gun with a crooked sight so that he couldn't win a good prize for Andy's birthday. When Andy finds out, he goes to the carnival and, after some carful observation and practice, adjusts his aim to the crooked sight and proceeds to clean out the two carnies of practically every prize they offer. Then when they try to cut him off he shows them his sheriff's badge, informs them that he's going to be giving their names to every sheriff in the area, and forces them to let Opie try again with an unmodified rifle. Andy and Helen then hide and watch as Opie makes five bull's eyes in a row, winning his father's birthday present.
In "Manhunt", the second episode, the state police write off Andy & Barney as clueless rednecks. Andy ultimately leads the escaped convict into a trap- upon realizing that the convict's holding a hostage within a home that he's visited, Andy lets slip that his boat is down by the lake, but fails to mention that it has a leak. Cue a very wet convict swimming back to shore and into the hands of the state police.
Barney's finest moment came in the second-season episode "Jailbreak". A payroll robber and his female partner have captured an arrogant state police officer who earlier had dismissed Andy and Barney's help. They find they're hiding in a trailer. Andy goes to call for backup, but Barney gets a better idea- drive the car hitched to the trailer out of the trailer park and right down to the courthouse, allowing him and Andy to arrest the robbers and rescue the state policeman.
In "The County Nurse," when Andy and Barney are trying to get Rafe Hollister to take a tetnus shot, Barney's attempt ends with Rafe firing at him. He comes back with Andy, and Rafe takes another shot at them. Andy (unarmed) just walks straight up to Rafe and takes the rifle out of his hand.