China had a trade deficit as recently as 1993, as shown in the graph below. After 2004, China’s trade surplus exploded from USD 32 billion to USD 102 billion.
The source of data for the graph is the National Bureau of Statistics of China. You may also want to check our China section, our graph of Chinese exports, and our graph of Chinese imports.