The 30-year deal was signed between Russia's Gazprom and China National Petroleum Corp, and comes at a time when the former is trying to find an alternate buyer for its gas after it may face European economic sanctions for Russia's involvement in the Ukraine crisis.
News of the deal sent Gazprom shares up by 2 percent.
"It's time we reached an agreement with the Chinese on this issue," Russian Prime Minister Dmitry Medvedev said in a Bloomberg Television interview in Moscow on May 19. "It is very likely that there will be a contract, which means long-term contracts."
The deal was signed as Putin was in Shanghai for a two-day visit, and comes after intense negotiations between the two countries, especially China, over the price of the gas. This will give Gazprom an opportunity to tap into large gas fields present in eastern Siberia, which were too far to supply European markets.
"This is undoubtedly an historic event," said Alexey Miller, chief executive officer of Gazprom. "This is truly an enormous supply volume."
Miller added that gas supply was expected to start in the next four to six years, and that the cost of constructing the $22 billion pipeline will be financed using advance payments for the gas. The two countries will also discuss the possibility of developing a second pipeline to the west of the first one.