A law passed in 2018 allowed betting companies to operate in the country and they have surged in popularity since then, but the government says loose regulation has allowed the business to grow untaxed and lawless.
"The regulation will require that betting companies are based in Brazil," the ministry said in a statement, as most are based abroad, as well as "improving the supervision, collection and dialogue with the agents that operate in the sector."
It was unclear if opening a locally-headquartered subsidiary would be enough for a foreign-based firm to meet the requirement.
The moves, which include taxing the firms, are part of an effort announced by Finance Minister Fernando Haddad last week to boost fiscal revenue to offset increased social spending.