The term's origins seem not to be very clear. I've been wondering, for quite a while now, what the connection between markets and fleas might be, so have had a little look around the net. There seem to be three main theories about the term's origins. They are as follows:
'Flea market' comes from the French marché aux puces, a name originally given to a market in Paris. The fleas were thought to be in the goods, because they were of the kind to attract vermin. The earliest English use we have found dates from 1922.
Another theory is that during the time of Napoleon III, changes in the streets of Paris were made in order that the military could march and move unhindered. Many of the dealers in second hand merchandise were forced to flee from their older housing. The merchants gathered in a new location which was referred to as the Flee Market, and the term morphed into Flea Market.
The term appeared at a time when the slums and alleys of Paris were being demolished and and gentrified. Whealer-dealers who lived and worked in these parts were forced to flee. The merchants' new gathering place was referred to as the "flee market," which later became "flea market." .
The term referred to the Fly Market in 18th century New York City. The Dutch referred to the market as vlie which translates to valley. The word was pronounced as flea and thus began the tradition of referring to that style of bazaar as a “flea market”.