Exports rose 19.4 per cent in May from a year earlier, slowing from the 29.9 per cent pace in April, while import growth accelerated to 28.4 per cent from 21.8 per cent in April, the customs agency said.
The export growth was below economists' expectations for a 21 per cent rise, while the imports came in faster than the consensus call for 22.5 per cent.
The trade surplus rose to $13.1bn (£8bn) from $11.4bn in April, but that was far below the forecast for $18.6bn in a Reuters poll.
Trade data for China is always closely watched because it is the world's biggest exporter and second-biggest economy.
May's figures took on even greater significance as economists try to gauge whether a recent slowdown in the global economy is a just a blip or the start of a more troubling slump.
"The general message is neither weak nor strong," said Ken Peng, an economist with Citigroup.