It is the first time North Korea has fired a projectile over Japan since 2009.
The launch, from Pyongyang, comes after Seoul's National Intelligence Service told South Korean lawmakers at a closed-door parliamentary session it had detected signs of the secretive state preparing for another nuclear test at its Punggye-ri underground test site.
Japan's Prime Minister Shinzo Abe said he would do all in his power to protect the Japanese public.
"We will make utmost efforts to firmly protect the lives of the people," Abe told reporters as he entered his office for emergency meetings on the missile firing.
The country's chief cabinet secretary, Yoshihide Suga, described it as an "unprecedented, grave threat".
The warning text to citizens said: "A missile was fired from North Korea. Please evacuate to a sturdy building or basement."
Alarm from the JP Gov again. "A North Korean missile passed over this area. If you find suspicious things, please never touch them." pic.twitter.com/EbYioe2VpZ
"Directly threatening the safety of the citizens of another country by flying a missile over them is a dangerous new escalation," he said in a statement.
"This is a totally unacceptable threat in a region of considerable importance to New Zealand.
"We stand by Japan in light of this concerning development, and we stand ready to do whatever we can to facilitate respectful dialogue between North Korea and other nations."
"I strongly call on North Korea to come to the table for talks to deescalate this volatile situation."
North Korea launched a rocket over Japan in 1998 and then a satellite payload in 2009.
Kim Jong-un has conducted a series of test launches to develop its missile capability and recently threatened to send missiles over western Japan and into waters near the US territory of Guam.
Japan's military is practicing deploying anti-missile batteries at three US bases in Japan.
The US military says the drills will test the ability of Japanese and US forces to work together and assess firing locations at the bases. They will also allow Japan to practice rapid deployment of its PAC-3 anti-missile system.
Kim Byung-Kee, a lawmaker of South Korea's ruling Democratic Party said the intelligence service reported North Korea "has completed its preparation to carry out a nuclear test at Tunnel 2 and Tunnel 3 of the Punggye-ri nuclear test site".
He added the service had evidence to suggest Tunnel 4 was being readied for more construction work.
Meanwhile, the despotic state has continued to test a variety of missiles, the US military has said.
It fired three short range ballistic missiles, which revived tensions with Washington after President Donald Trump had said Pyongyang was starting to show "respect".
The launches come as tens of thousands of South Korean and US troops take part in joint military drills in the south of the peninsula, which the North views as highly provocative.
Following an initial US assessment saying that two of the missiles had "failed in flight", a spokesman for the US Pacific Command later said the two weapons had not failed but "flew approximately 250km in a northeastern direction".
One of the three missiles blew up "almost immediately", and none of the weapons posed a threat to either North America or Guam, the spokesman said.
Lee Il-Woo, an analyst at Korea Defence Network, said the launches represented a "low-level provocative act" carried out in response to the US-South Korea exercises, which are seen by Pyongyang as a rehearsal for an invasion of its own territory.
The joint exercises started on Monday at a time of heightened tensions between Pyongyang and Washington, after two successful intercontinental ballistic missile (ICBM) launches carried out by North Korea last month apparently brought most of the United States into range for the first time.
Analyst Yang Uk at the Korea Defence and Security Forum told AFP the latest launches by Pyongyang were "carefully calibrated to avoid revving up tensions too high beyond its control".
The launches, which took place over 30 minutes, came as North Korean state media reported that leader Kim Jong-Un oversaw a military exercise simulating a special forces assault on South Korean border islands involving aircraft, "multiple-missile launchers" and howitzers.
Neither Japan nor South Korea confirmed the US military's description of the weapons fired by North Korea as "ballistic missiles".
South Korea's defence ministry said "unidentified projectiles", fired at 6.49am flew about 250km towards the Sea of Japan.
"They could be ballistic missiles but they could be rockets. We are now analysing," said Japan's Defence Minister Itsunori Onodera, adding that they did not fly on a "lofted" trajectory.
Under Kim Jong-Un, Pyongyang has made rapid strides in its ballistic missile technology in violation of UN resolutions, and it has been penalised by seven sets of sanctions.
Trump has called on China to play a more active role to rein in its neighbour, which relies heavily on the Asian giant for its economic survival.