The gas will be transported along a new pipeline linking Siberian gas fields to China's main consumption centers near its coastline.
Russian President Vladimir Putin and his Chinese counterpart Xi Jinping witnessed the deal in Shanghai between Russian state-controlled company Gazprom and China National Petroleum Corp (CNPC).
Gazprom declined to disclose what price was agreed, a key hurdle in talks that have dragged on for more than a decade, Reuters reported on Wednesday.
Symbolically, for Putin the agreement represents a major triumph as he seeks to forge new partnerships in Asia while customers in Europe attempt to reduce their reliance on Russian gas in the wake of the crisis in Ukraine.
But from a commercial point of view, much will depend on the price and other terms of the deal.
Shares in Gazprom rose almost two percent in reaction to the announcement of the deal.