Andy mentions that the muzzle to the old cannon was busted whey they tried to fire it during a 4th of July celebration. Six years later, in The Cannon, Mayberry would sport a brand new cannon - which Deputy Warren Ferguson would fire by accident.
Opie: If honesty is such a good policy, how come I'm out a cap pistol?
Andy: Well, bucket mouth, do you know anyone that wants to buy a cannon?
Andy: Barney, I'll tell you the truth, You are a bird in this world.
The title of this episode seems to indicate that Andy is selling a horse (and not a cannon). Horse trading was often considered a shady occupation as those wanting to unload bad horses often failed to mention or lied about a horse's shortcomings while exaggerating or simply making up a horse's good qualities.
Andy claims the cannon was owned and used by Teddy Roosevelt in the Battle of San Juan Hill - The Battle of San Juan Hill (actually the battle for San Juan Heights) was the bloodiest and most famous battle of the Spanish-American War. Lt. Colonel Theodore Roosevelt led an heroic charge up Kettle Hill during the battle - but he was forced to dismount and advance on foot, not horseback - and he didn't have any cannon.
The other battle Andy mentions, the Battle of Fort Sumter (April 12, 1861 - April 13, 1861), involved the bombardment of the large, Northern-held river fort near Charleston, South Carolina - which began the American Civil War. Andy claims, with some southern pride, that Mayberry's cannon fired the first shot, hence kicking off our nations bloodiest war. In actuality, the first shot appears to have been a mortar round fired from Fort Johnson.