It was the fourth straight month of deficit for Japan's export-dependent economy. However, the October figure was less than September's deficit of $7 billion.
The impact from the slowdown in exports to Europe because of the debt crisis there and to China as a result of the dispute over the Senkaku Islands stretched into October, government data showed.
Japan is the world's third-largest economy after the United States and China.
Its total October exports fell 6.5 percent year-on-year, the fifth straight month of such decline, Kyodo News reported. October imports dropped 1.6 percent.
China is Japan's largest trading partner, with bilateral trade totaling about $340 billion annually. The territorial dispute worsened in September after the Japanese government announced the purchase of the islands, triggering violent protests in China and a boycott of Japanese goods.
The Japanese economy is also facing a threat of another recession after it contracted 0.9 percent in the July-September quarter from the previous quarter.
Prime Minister Yoshihiko Noda, under growing political pressure, last week dissolved the lower house of Japan's Parliament, paving the way for early elections Dec. 16 that could result in the defeat of his ruling Democratic Party of Japan, which has been in office since 2009.
Toddler uninjured after being knocked over by Obama family dog
Martin Bashir resigns from MSNBC over Sarah Palin comments