Exports grew 8.2 percent from the same month the previous year, the Finance Ministry said. In September, exports fell 1.2 percent from the previous year in the first decline for the world's third-largest economy since 2016. Imports in October grew 19.9 percent on-year.
Worries are continuing over trade tensions after President Donald Trump imposed penalty tariffs on billions of dollars' worth of Chinese exports.
Weaker U.S.-China trade generally hurts the export-dependent Japanese economy. Trump has also complained about Japanese auto imports. Bilateral trade talks are expected next year.
Monday's data showed Japan racked up a trade deficit of 449 billion yen ($4 billion).
Japan's imports from the U.S. jumped 34 percent, including imports of food, oil, steel and other metals and machinery, while exports to the U.S. grew nearly 12 percent, mostly in autos, machinery, medical products and rubber.
Cabinet Office data released last week showed a contraction for the Japanese economy, at an annualized rate of 1.2 percent in July-September, as consumer spending, investment and exports slipped.
Natural disasters have hurt Japan recently, including the closure of a major airport in the western Kansai area after a typhoon. A major earthquake that hit the northernmost island of Hokkaido, causing fatal landslides and widespread blackouts, has also weighed on the economy.
Prime Minister Shinzo Abe has been pushing for growth with his "Abenomics" policies based on a deflation-fighting stimulus program of cheap lending.