TAPACHULA, Mexico—A caravan of about 1,000 Central American migrants crossed into Mexico and began trekking north on Tuesday, a few hundred miles behind a larger caravan also headed to the U.S. border.

The two caravans, plus a third smaller one from El Salvador, are part of an exodus of Central American migrants traveling through Mexico that is straining U.S.-Mexico ties and a target of President Donald Trump’s ire before next week’s midterm U.S. elections. Mr. Trump, who called the caravans an invasion, this week ordered...