According to Wikipedia, "In the first season, Andy and Barney comment that they are cousins, but this is not mentioned again for the rest of the series. Genetics aside, Barney and "Ange" (as he frequently addresses Andy, a derivation from Knotts' real-life nickname for Griffith) are best friends, having grown up together in Mayberry, and Barney maintains warm relations with Andy's son Opie and his Aunt Bee."
Other comments found online maintain the hard G in "Ange" was derived from Andy Griffith's middle initial, claiming Andy's full name was Andrew Jackson Griffith. Wikipedia lists his given name as Andrew Samuel Griffith. It would then seem logical that Barney drew the G from his last name, not any middle name association.
Chat with our AI personalities
Barney wanted to shorten Andy's name, as a show of affection, as we all do. The shortening to 'And' is not as 'comfortable' to say as 'Ange'. I have a friend who is called Andy and I call him Ange. (My name is Angie, so it's getting quite confusing!!).
I heard one theory that says "AnG" might be short for Andy + Griffith. I listened closely to Barney and think he might be saying "Ands" but with Don Knotts accent or unique voice, it comes out sounding like "Ange".
Barney
That episode is titled The Cow Thief. Someone stole a local's cow and before Andy and Barney can solve the crime the mayor calls in a state investigator. Barney felt insulted and vowed to turn on the 'big freeze', in other words, snub the big city fellow. All ends well though when Andy solves the crime.
I think it was 'Barney Fife's Talent, season 7, episode 19.