The guidelines, which were approved by the Cabinet, also call for a stronger alliance with the US, Japan's biggest ally, and expanded security networks with regional partners, including South Korea and Australia.
China immediately slammed the guidelines as "irresponsible".
Foreign Ministry spokeswoman Jiang Yu said China is a force for peace and development in Asia and threatens no one.
To bolster its forces, Japan will acquire new submarines and fighter jets, upgrade its missile defence capabilities and make its ground forces more mobile so that they can quickly respond to emergencies in southwest Japan.
The guidelines paint China as a bigger threat than Russia and say Japan is shifting its defence emphasis from the northern island of Hokkaido to islands in the south, such as Okinawa and territories claimed by both Tokyo and Beijing that have recently led to diplomatic tensions.
The Japan-US alliance remains "indispensable" to Japan's security, the guideline said, calling for stronger cooperation between Japanese and the 47,000 US armed forces based in this country. It also urged Japan to use its diplomatic and defence capabilities "more proactively".
But the guidelines cited "changes in global power balance" and noted a relative decline of America's strength and rise of emerging countries such as China and India.
Japan, meanwhile, should pursue its own efforts to enhance missile defence capabilities to protect itself from threats by China and North Korea, it said.
"We still have lots of tanks and Ground Self-Defence Forces on Hokkaido and we need to shift to the southwestern islands," a senior government official said on condition of anonymity before the official release of the guidelines.
The official said the goal is to "modernise our defence posture from our Cold War days."
The guidelines said China's rapid military buildup and lack of transparency are matters of concern.
It said North Korea's military activity is a "pressing and serious destabilising factor" for Japan and causes grave problems for international nonproliferation efforts.
"The Korean Peninsula and North Korea are imminent and concrete threats to Japan, while China is more of a medium-term threat...It is a major risk factor for Japan's security in the southwestern islands and the Japan-US security alliance in the long run," said Hideshi Takesada, executive director at the National Institute for Defence Studies.