The new firm, to be called Nigaz, is set to build refineries, pipelines and gas power stations in Nigeria.
Analysts say the move could further strengthen Russia’s role in supplying natural gas to Europe.
The agreement comes during a four-day African tour by Russian President Dmitry Medvedev.
As well as forming Nigaz, Russia is keen on developing a trans-African pipeline to transport Nigerian gas to Europe.
This could further reinforce Gazprom’s already-strong influence over Europe’s energy supplies.
"Russia has a number of goals [in Africa], one of which would be to take part in a growing competition for resources and markets on the continent – mainly with China," said Yaroslav Lissovolik, head economist with Deutsche Bank in Moscow.
Sergei Novikov, a spokesman for Rosatom, Russia’s state-run civil nuclear energy agency, said the Nigaz deal would lay the foundations for building nuclear power reactors in Nigeria.
Nigeria has previously said it would like to develop a nuclear power plant to address its energy shortages.
Before visiting Nigeria, Mr Medvedev spent time in Egypt.
He is also visiting Namibia and Angola – which are rich in natural resources – during his trip, as he seeks to promote Russian business interests.
"Part of the agenda is to push Russia’s credentials as a representative of commodity-rich developing countries with such forums as the G8 and the G20," said Ural Sib bank’s chief strategist Chris Weafer in a note to investors.