About two dozen migrants climbed over the border wall separating Mexico from the US near Tijuana on Monday.
While some ran to evade capture, most handed themselves in to border guards.
The attempt to cross into the US illegally came just days after the migrants were transferred from one temporary shelter to another after it had become unsanitary.
Thousands of people have left Central America for Tijuana in the hope of crossing into the US.
They arrived in mid-October after having travelled more than 4,000km (2,500 miles), much of it on foot.
The group, dubbed “migrant caravan”, has been camping out in a sports complex turned into a temporary shelter by the local authorities.
Last week city authorities bussed them to a concert venue that now acts as a federally run shelter, 14 miles to the south. Officials said conditions at the Benito Juárez sports complex on the border had become untenable after parts of it had flooded.
They told the migrants food and medical services would no longer be provided there. Having spent a month trekking towards the United States, many of the migrants are growing frustrated at the long wait that faces them at the border.
Many say they are fleeing gang violence in their home towns and want to apply for asylum based on “credible fear”, while others are hoping for better job opportunities in the US.
Applying for asylum at a border post can take months and with US officials restricting the number of applicants to between 40 and 100 a day at El Chaparral port of entry in Tijuana, the migrants could be stuck for months or even years in the shelter.
Some of those jumping the fence said they hoped their cases would be heard more quickly that way.
US President Donald Trump has lashed out at the migrants, calling them an “invasion”, which he said threatened to “overrun” the US. He has sent troops to the border and issued an order denying the possibility of asylum to migrants crossing the southern border illegally – but that order has since been halted by a US federal judge.