Flanked by top U.S. officials, Trump also announced that his administration would invoke a health-focused statute to block migrants from either border from entering the United States illegally, saying illegal immigration threatens "to create a perfect storm" in combination with the virus.
The "non-essential" travel measures will restrict tourism at the border.
The measures against illegal immigration mean the United States can rapidly return Central Americans and Mexican migrants it arrests, the Mexican Foreign Minister Marcelo Ebrard said earlier, speaking in Mexico City.
Roughly 3 million personal vehicles crossed legally each month in 2019 between San Diego, California, and the Mexican border city of Tijuana, according to U.S. Department of Transportation data.
A U.S. official said the restrictions would not impact rail or trucking shipments across the border.
Trump has said for weeks he was considering southern border restrictions to contain coronavirus, with infection fears adding to his ongoing campaign against migration ahead of the 2020 presidential election.
The United States so far has many more confirmed coronavirus cases and deaths than Mexico.
While Mexico already allows the United States to send it Latin American migrants, mainly to await U.S. asylum hearings in Mexican territory, the decision to allow a rapid turn around of Central Americans appeared to be a new concession.
Ebrard said Mexico will not allow the United States to return other nationalities to Mexico under the new immigration measures, which he said only applied to border apprehensions, not other deportations.
He said about 1,200 Mexicans are currently apprehended illegally crossing the border each day, and about 120 Central Americans.
The United States was aiming to send those migrants back to Mexico within a day, down from a three-day turn around currently, he said.