By Agence France-Presse
The blaze was sparked as workers tried to clear the spill in waters near Balikpapan City by burning it.
Two people -- believed to be fishermen -- were caught in the fire and died, a spokesman of the local search and rescue agency said.
"The fire was quite big, about two kilometres high. It can be seen from Balikpapan city and the smell was all over the place," said Octavianto, a senior official of East Borneo search and rescue agency, who like many Indonesians go by one name.
Authorities have managed to put out the fire but there was still an oil spill in the waters.
It was not known how much oil was spilled or where it came from.
A boat carrying coal was temporarily stuck near the fire, Octavianto told AFP, but the search and rescue teams successfully evacuated all 20 crew on board.
Indonesia relies heavily on boats to ferry people and goods around its vast archipelago of about 17,000 islands.
Boat accidents are common, but oil spill cleanup accidents are rare.