The quake hit at 8.16am local time today with the shallow focus located in Nagano prefecture, some 180km north-west of Tokyo, the Japan Meteorological Agency said.
It was followed by smaller aftershocks.
The tremor damaged Matsumoto Castle in Nagano, causing cracks in the inner walls of a tower built in the late 16th century, according to a municipal official.
Television footage showed fallen concrete bricks and roof tiles in the area.
Public broadcaster NHK said the morning tremor injured nine people, including a woman who fell off her bed.