Analysts said seasonal factors linked to the annual week-long Lunar New Year holiday help explain February's trade deficit, the first in three years.
Exports rose 4 percent from a year earlier in January and February to $302.8 billion, rebounding from a 6.1 percent contraction in December, customs data showed Wednesday.
The exports and imports figures yielded a trade deficit of US$9.15 billion, the first monthly deficit for the country since February 2014, when there was a trade gap of almost US$23 billion.
US trade deficits featured prominently in November's election and President Donald Trump has pledged to make the nation's commercial relationships more balanced. But economists worry that Trump's tough talk could spark all-out trade wars in which foreign nations retaliate by boosting their tariffs on American goods. Despite the rare trade deficit China chalked up in February as imports surged the most in five years, underlying data suggest exports are on a rising trajectory that risks fanning trade tensions with the U.S.
The data also showed the merchandise trade gap with China, the world's second-biggest economy, widened to $31.3 billion in January from $27.8 billion on an unadjusted basis.
Imports in February surged 38.1% from a year earlier, compared with 16.7% growth in January.
Market demand, especially domestic demand, is increasing significantly, General Administration of Customs head Yu Guangzhou told reporters yesterday.
In January, imports of goods and services increased 2.3 percent to $240.6 billion, the highest since December 2014, as the country imported 259 million barrels of crude oil.
As the world's biggest trader in goods China's performance has an impact globally and its recent slowdown - it grew a year ago at its slowest pace in a quarter of a century - has weighed on the world economy.
"The deficit, in combination with the increase in China's forex reserves revealed yesterday, also suggests that capital outflows have narrowed sharply recently", Julian Evans-Pritchard of China Economist said in a note.
Carrie Gracie: Could China's Trump tactics actually be working?
China's advanced exports index continued its gaining streak to stand at 40.2 in February, up from 39 in January.