He was subsequently detained and transferred to a facility at Viracopos airport in Campinas, according to the report.
Ecclestone, 91, acknowledged owning the gun, but said he was unaware it was in his luggage at the time, police said.
The Briton paid bail and was freed to travel to Switzerland.
In 2016, Ecclestone’s helicopter pilot was arrested on suspicion of being the mastermind of a plot to kidnap his mother-in-law as police believe it was an inside job.
Ecclestone is married to Brazilian-born Fabiana Ecclestone, an FIA vice-president and member of the World Motor Sport Council.
Aparecida Schunk, the mother of Ecclestone’s Brazilian wife Fabiana Flosi, was snatched from her home in São Paulo by armed robbers who posed as delivery men.
A police kidnap squad in Brazil stormed the building where she was being held and found her tied up – and released her into the arms of her family.
They attended several events in the South American country in May, including a local Stock Car race in the countryside near Sao Paulo and a meeting with triple world champion Nelson Piquet in Brasilia.