The trade gap totalled $38.7bn (£24.5bn), down from a revised estimate of $44.6bn for September, a Commerce Department report showed.
Analysts surveyed before the report had expected the October trade deficit to narrow just slightly to about $43.6bn.
The smaller-than-expected deficit could boost estimates of US fourth-quarter economic growth because it implies a larger share of US demand is being met by domestic production.
"This suggests that the economy is accelerating," said Neil Dutta, an economist at Bank of America Merrill Lynch in New York, raising his forecast of fourth-quarter economic growth to about three per cent.
But one big reason the trade deficit is shrinking is "because we're still in a slower-growth economy. You'd imagine that a smaller number would be a good thing, but it's because people still have to contend with a slower economy," said Robert Pavlik, chief market strategist at Banyan Partners in New York.
US stock index futures held onto their gains after the trade data, while US Treasury bond prices added to losses. The dollar held steady.
On an annual basis, the trade deficit has widened sharply this year and could surpass $500 billion when final figures for 2010 are available.
Last year, in the midst of the global financial crisis which put a squeeze on world trade, the US trade gap narrowed about 46 per cent to $374.9bn.
Record exports to China and Mexico in October helped push the overall export tally to $158.7bn, the highest since August 2008.
Exports to the European Union and Japan also showed growth.
Overall US imports fell 0.5 per cent to $197.4bn, led by drop in imports of industrial supplies and materials and the lowest petroleum imports since November 2009.
Despite the overall drop, imports from Mexico were the highest on record and imports from Japan and the European Union were the highest in two years.
Imports of advanced technology products also set a record.
Despite record exports to China in October, the US trade deficit with that country in the first ten months of 2010 was $226.8bn, up 20.3 per cent from the year-earlier period.
The sharp rise is likely to keep China's trade and currency policies on the minds of US lawmakers in 2011.