The Movement for the Emancipation of the Niger Delta (MEND) said the attack had left the oil tanker loading facility in flames.
Its claim came ahead of a court hearing Monday that was expected to see treason charges dropped against a top MEND leader as part of a bid to defuse the rebellion.
Emergency services spokesman Geoffrey Boukoro said the bodies of five workers, all burned beyond recognition, had been found at the Atlas Cove jetty.
Boukoru, said the militants exchanged fire with the navy guarding the facility on Lagos' Tarkwa bay, before they used dynamite to hit 10 pipes.
"They used dynamite to destroy the manifold," he added.
The MEND campaign against Nigeria's main oil facilities over the past three years have badly hit much needed oil revenues. Until now its attacks have been concentrated on the Niger Delta, the main oil producing region in the south of the country.
MEND said it had carried out its "unprecedented" first attack on Lagos late Sunday. An explosion reverberated across the city of 16 million people just before midnight but no-one could say what had caused it.
MEND's statement said the "depot and loading tankers moored at the facility are currently on fire".
"We encountered some slight resistance from the Nigerian navy guarding the facility but they were easily over-powered. Over nine may have been injured or killed," said MEND.
Hakeem Bello, spokesman for the Lagos State governor, said the attack was being investigated.
"But I must say at this stage that Lagos state government will not tolerate any act of criminal sabotage in any part of the state," he said.
Military and police spokesman also confirmed the attack with adding further comment.
The government has been trying to blunt the rebel campaign with an amnesty deal and treason charges against a top MEND leader, Henry Okah, are expected to be dropped at a court hearing on Monday.
Lawyers for Okah and top government officials agreed on the hearing at a meeting Sunday, Okah's lawyer Femi Falana told AFP.
Okah has detained in September 2007 for gun-running and faces treason charges. His release has been one of the rebels' main demands.
President Umaru Yar'Adua on June 25 declared an unconditional pardon for militants in the Niger Delta, if they "surrender their weapons and renounce militancy." The amnesty offer is valid until October 4.
Violence in the southern region of the world's eighth largest oil exporter has cut output by more than 30 percent over the past three-and-a-half years.
Apart from attacks on oil installations in the Niger Delta, hundreds of oil workers -- foreign and local -- have been kidnapped. Some were held for several months.
The rebels launched their "oil war" in the swamps and creeks of oil-rich southern Nigeria in 2006, demanding that local people get a more equitable share of the oil wealth, but Sunday night's attack marked the first time their campaign had reached Lagos.
MEND said "the problems facing our dear country Nigeria has nothing to do with militant freedom fighters but with the corrupt political leadership and certain arrogant tribes still living on past glory".
The group adopted a pugnacious tone in its Sunday statement, replete with Biblical references.
"The two-pronged approach of combining dialogue and intensifying attacks throughout the course of negotiations, will be the unique characteristics of Moses," MEND said, referring to its latest battles which it has called 'Hurricane Moses.'
State-run Nigerian National Petroleum Corporation (NNPC) said recently that monthly oil revenue this year dropped to around one billion dollars from an average of 2.2 billion dollars in 2008.
Nigeria, Africa's most populous country, relies on oil for more than 90 percent of its export earnings. Its foreign reserves have plummeted by about 10 billion dollars in six months to 43.19 billion dollars in early June.