Full-year shipments rose 5 percent to a record high of 1.075 billion tonnes, exceeding 1 billion tonnes for a second year.
China's December imports came in below market expectations, with a 4.5% year-on-year growth, while exports beat forecasts to rise 11% year-on-year, official data showed Friday.
What's more, if China's economy slows this year as some experts predict, that could widen the trade deficit further.
Friday's trade data reflects cooling ties between Beijing and Pyongyang. "Appetite for imported iron ore from Chinese steel mills remains strong".
Imports for the whole of 2017 jumped 27 percent from 2016 to a record of 68.57 million tonnes.
Trump has put tackling the growing trade deficit with China and boosting USA firms' access to its markets among his top priorities since coming to power.
In an interview with The Wall Street Journal on Thursday, before the latest trade figures were published, Mr. Trump suggested he would have resorted to sterner measures to correct the trade imbalance with China if it weren't for Beijing's help in pressuring North Korea to stop its nuclear weapons development.
Washington has also launched the procedure for a probe into whether Chinese companies are stealing the intellectual property of USA companies. Publicly, the Chinese government has sought to play down tensions.
China's trade surplus with the Unites States widened in 2017 while total foreign trade volume maintained rapid growth, customs data showed Friday.
A commerce ministry spokesman, Gao Feng, said at a briefing on Thursday that China will "adopt all measures necessary to firmly protect the country's lawful interests and rights, should the USA perversely take unilateral protectionist actions". "What I want to stress is that China had never sought a trade surplus on goal".
The gain is a sign China's manufacturing sector, and exports, are benefiting from the global economic recovery. US figures put the 2015 deficit with China at $367 billion. The U.S.is expected to release the findings of the investigation soon.
Just how badly could Trump's threatened 45pc tariff hurt China? Mr. Trump, though, has repeatedly pulled back from the severe moves he touted on the campaign trail because, he says, Beijing is working with Washington to restrain North Korea.
The government is planning to announce GDP data for 2017 next week.