Of the total, 316 will be prosecuted for damaging a barbed-wire fence set down by Hungary on its Serbian border, and the other 51 for illegally entering the country, they said.
More than 200,000 migrants have transited through Hungary so far this year, with most of them seeking to get to Germany.
On Monday alone, police said a record number of 9,380 migrants had entered the country.
Under the new laws, crossing the border illegally can result in a prison term of up to three years.
Hungary is also planning another anti-migrant fence along part of its border with Romania, a minister said on Tuesday.
The moves have been criticised by human rights groups, and the Council of Europe -- the European human rights watchdog -- has expressed concern.
