The epicentre was the Bungo Channel, a strait separating the Japanese islands of Kyushu and Shikoku, the agency said.
Ehime and Kochi prefectures were hit by the quake with an intensity of 6 on Japan's 1-7 scale, the JMA said.
Some water pipes burst, but no major damage has been reported, local media said.
Shikoku Electric Power's TIkata nuclear plant in Ehime prefecture, where one reactor is in operation, reported no irregularities, Japan's government spokesperson Yoshimasa Hayashi told reporters.
Hayashi also warned of a chance of other earthquakes with lower six on the Japanese seismic scale.
Earthquakes are common in Japan, one of the world's most seismically active areas. Japan accounts for about one-fifth of the world's earthquakes of magnitude 6 or greater.
On March 11, 2011, the northeast coast was struck by a magnitude 9 earthquake, the strongest in Japan on record, and a massive tsunami. Those events triggered the world's worst nuclear crisis since Chernobyl a quarter of a century earlier.