Mr. Putin had also been expected to agree to China's demands on price in part because of the weak Russian economy. The International Monetary Fund projects Russia's economic growth in 2014 will be 0.2 percent.
But China was in no hurry to sign a deal, said Shoichi Itoh, a senior analyst at the Institute of Energy Economics in Tokyo. "China already has enough gas from Central Asia, and now Myanmar, until the mid-2020s," he said. "Unless Russia made a compromise on price, China has no reason to sign it."
In recent weeks, Mr. Putin has repeatedly emphasized that Russia sees its economic future with China, which is on a trajectory to surpass the United States as the leading global economic power. Mr. Putin's focus on China is also consistent with his conservative nationalist ideology, emphasizing family values and patriotism and criticizing what he views as the West's moral decadence.
Read MoreGazprom head soothes Europe over gas supply
Mr. Putin arrived in Shanghai on Tuesday to attend a conference of Asian countries hosted by China. Mr. Xi seized the opportunity to give Mr. Putin a warm welcome, even though it was not a state visit, by making sure ships from a Russian-Chinese naval exercise in the East China Sea berthed in Shanghai and by meeting Mr. Putin one-on-one at the start of the gathering.
After the leaders' meeting, Xinhua said that Russia and China had proposed establishing a comprehensive energy partnership, and that the two sides would deepen their cooperation in the oil sector.
China has maintained an official neutrality on Russia's actions in Ukraine, but that position has begun to tilt in favor of Moscow because of the "quite bad" atmosphere between China and the United States, said Shi Yinhong, a professor of international relations at Renmin University in Beijing.
If the gas deal went ahead in the coming period, Mr. Shi said, it would be "a Chinese financial assistance contract for Russia in guise of commercial payment."