I asked myself the same question. My google fu came up with:
A buckler was a type of small shield, held by a handle at the back, whose main purpose was to deflect blows from the sword of one’s opponent. Its name is from Old French (escu) bocler, literally “(a shield) with a boss” (this last word, for a protrusion at the centre of something, is itself from French). Someone who swashes is dashing about violently or lashing out with his sword, often in pretend fights. It seems to have been an echoic term from the sound of swords clashing or banging on shields.
In the sixteenth century swashbuckler was created from these two words to convey the idea of a swaggering, bullying ruffian or undisciplined lout, who made a lot of noise but to little practical purpose. It was most definitely not a compliment to be called one in those days — a writer in 1560 described a man as “a drunkard, a gambler and a swashbuckler”.