Meteorological authorities warned residents of possible aftershocks and landslides in the coming days, but said there was no risk of a tsunami.
Government spokesman Hirokazu Matsuno told reporters in Tokyo that he had been informed of the death of one person and “multiple buildings collapsed.”
The victim fell from a ladder, a crisis management official told AFP, adding that 21 other people had been injured.
The local fire and disaster management agency said at least three buildings collapsed and two people were trapped inside.
One of them had been pulled from the rubble and sent to the hospital, and rescue teams were looking for the second.
Images from NHK show traditional Japanese wooden houses destroyed or tilted, with broken windows and damaged roofs.
In aerial shots, the side of a collapsed mountain can be seen.
Friday is a public holiday in Japan and many people travel for leisure or to visit family.
High-speed trains between Nagano and Kanazawa, a popular tourist site, have been halted, according to the railway company, JapanRailway.
The quake reached level 6 of the Japanese Shindo scale, which goes up to 7, in the city of Suzu, in Ishikawa, which means it could cause major landslides.
Earthquakes are frequent in Japan, which is located in the Pacific “Ring of Fire”, an area of high seismic activity.
However, the Asian country has strict construction regulations to ensure that buildings can withstand strong earthquakes and regularly conducts emergency drills.