It fell 2.4% to $57.6bn (£28.3bn), the lowest monthly shortfall since January.
The politically-sensitive deficit with China narrowed by 5.3% to $22.5bn as the US sold more aircraft and soybeans while China sold fewer computers.
Despite a string of high-profile safety recalls of toys, Chinese toy exports to the US actually increased.
This was largely due to retailers ordering more stock ahead of Thanksgiving and Christmas.
Weak dollar
The value of US exports rose to a record $138.3bn in August thanks, in part, to the fall in the value of the US dollar against other major currencies which made exports more competitive.
In contrast, the value of imports fell 0.4% to $195.9bn as US firms reduced shipments of foreign-made cars and furniture.
The narrowing deficit is good news for the Bush administration which has faced sustained criticism over the country's spiralling trade imbalance in recent years.
The deficit for the first eight months of 2007 totalled $708bn, down 6.7% on the corresponding period last year.
The strength of the export sector also provides a fillip for companies worried about the state of the US economy amid the housing slump and instability in financial markets.
Wall Street responded positively to the figures, with one analyst calling it a "great number".
"The trade deficit is smaller than expected on a weaker dollar," said Michael Woolfolk, senior currency strategist at the Bank of New York Mellon.