BEIJING—Chinese exports rebounded in April, as companies rushed to make shipments ahead of expected tariffs brought on by trade tensions with the U.S.

Exports jumped 12.9% last month from a year earlier, after falling 2.7% in March, the General Administration of Customs said Tuesday. Imports surged 21.5% from a year earlier, compared with a 14.4% increase in March. Both exports and imports beat economists’ expectations.

“However...