According to a report by Brazilian newspaper Globo.com, Ecclestone, 91, was arrested at Viracopos Airport in Campinas, Sao Paulo.
Ecclestone was stopped when the x-ray machine detected a 32-calibre LW Seecamp pistol, without the necessary documentation, inside his luggage.
Reuters reported that Ecclestone admitted to owning the gun but claimed he was not aware it was in his luggage at the time.
After making a bail payment of R$6,000, Ecclestone was released and freed to complete his journey to Switzerland.
Following a 40-year reign at the helm of F1, Ecclestone was removed from his position after the takeover of the sport by US giant Liberty Media in January 2017.
Ecclestone’s wife, Fabiana was elected as the FIA’s vice-president for sport at the end of last year, under the leadership of new president Mohammed Ben Sulayem.