The June figures may have received a boost from U.S. and Chinese traders who rushed to fill orders for soybeans, ball bearings and other goods in both directions before threatened tariff hikes took effect.
The conflict with Washington, coupled with weaker global demand, adds to challenges for Beijing as economic growth cools after regulators tightened controls on bank lending starting last year to rein in surging debt.
"Chinese exports held up well on the eve of U.S. tariffs," Julian Evans-Pritchard of Capital Economics said in a report. "But disappointing import figures point toward weakening domestic demand." Washington added 25 percent tariffs on $34 billion of Chinese goods on July 6 in response to complaints Beijing steals or pressures companies to hand over technology. China retaliated with higher duties on a similar amount of American goods.
This week, the Trump administration announced a possible second round of tariff hikes targeting a $200 billion list of thousands of Chinese products. Beijing criticized the measure but has yet to say how it might respond.
"There will be challenges facing foreign trade with rising instabilities and uncertainties in the global environment," said a Chinese customs agency report. June exports to the United States grew faster than China's total with the world, expanding by 13.6 percent over a year ago to $42.6 billion in a possible sign exporters were rushing to fill orders.
China imported American goods worth $13.6 billion. Its politically volatile trade surplus with the United States widened by 14.2 percent to $29 billion. China is running out of American goods for retaliatory tariffs due to their lopsided trade balance.
Last year's imports from the United States totaled about $130 billion. That leaves about $80 billion for penalty tariffs after previous increases either imposed or threatened on a total of $50 billion of U.S. goods are counted.
Beijing has stepped up efforts, so far without success, to recruit governments including Germany and France as allies. They criticize President Donald Trump's tactics but share U.S. complaints about Beijing's industrial policy and market barriers.
China's global trade surplus in June narrowed by 10.9 percent to $41.6 percent. The surplus with the 28-nation European Union, the country's second-largest trading partner, expanded by 33.6 percent to $16.3 billion.
"Export growth will cool in the coming months as U.S. tariffs start to bite alongside a broader softening in global demand," said Evans-Pritchard. "Import growth is set to slow further as domestic headwinds from property controls and weaker investment spending continue to intensify."
General Administration of Customs of China (in Chinese): www.customs.gov.cn
AP Writer Yanan Wang contributed.