The captain of a Japanese oil tanker is missing after the vessel exploded off the country's southwest coast.

Masaichi Ando, 64, was still unaccounted for hours after the Shoko Maru, a 998-ton tanker, burst into flames near the port city of Himeji, where it had unloaded its cargo of crude oil, the coast guard said.

The other seven members of the crew - all Japanese nationals - were rescued. Four reportedly suffered severe burns and were rushed to a hospital.

A search was underway for the missing captain while coast guard vessels were at work to douse the raging flames.

Akihiro Komura, an official from Shoho Shipping, a Hiroshima-based shipping firm that owns the Shoko Maru, said the vessel was "virtually empty" when the fire started.

"The ship unloaded crude oil at a port in Hyogo Prefecture," Komura told AFP.

The cause of the explosion was unclear but Komura suggested the fire might have been sparked by works to remove paint on the ship's deck.

"I heard that a crew member was using a grinder to remove paint and that seems to have triggered the blast, which we believe could have occurred when the remnants of the oil caught fire," he said.