The deal will create a state-controlled petroleum colossus and give foreign investors access to its shares.
After the merger, Gazprom will get 100% of Rosneft's shares via a share swap, and the government, which already holds 38% of Gazprom, will get 51% of the new entity. The merged company will still be called Gazprom.
Gazprom has 16.3 trillion cubic metres of proven gas reserves - about 10% of the world's total - and supplies about a quarter of Europe's natural gas imports.
The merger with Rosneft will see its crude oil output jump by about 10 million tonnes.
Gazprom CEO Alexei Miller said Yuganskneftegaz - the former core Yukos production unit bought by Rosneft late last year after a controversial government auction - was not a part of the merger deal.
After the merger, Yuganskneftegaz would operate as a separate, government-owned oil company, which would work closely with Gazprom.
But Yukos spokesman Alexander Shadrin said that the court battle for Yuganskneftegaz would continue.
"We aren't so concerned what Yuganskneftegaz is turned into, whether it becomes a separate state company or another Disneyland," the Interfax news agency reported Shadrin as saying.
"Those in charge now and in the future need to remember that they are running an asset whose lawful owner is Yukos."
But with Yukos last week losing its bid to fight on in US courts, the embattled company seems to have run out of options.