The amendment to the 2006 renewable energy law was adopted on Saturday by the standing committee of the National People's Congress, China's legislature, the Xinhua news agency said.
The amendment also gives authority to the State Council energy department, together with the State Council finance department and the state power authority, to "determine the proportion of renewable energy power generation to the overall generating capacity for a certain period."
Many other countries also have requirements that grid operators priorities the dispatch of power from renewable sources, even if it is more expensive than coal-fired baseload plants.
In China, a boom in wind-power plants thanks to government subsidies has resulted in a large amount of wind capacity that is not always properly connected to the grid. In some cases, the wind farms are not located at the optimal spot for wind.
One-third of China's installed wind power capacity is not well connected to the grid, Xinhua said, citing industry experts.
Much of China's wind power is installed in remote, wind-swept regions like Inner Mongolia and Gansu, where power demand is low. But some of the country's cheapest coal generators are also in Inner Mongolia, pricing the wind farms out of the power market.
"Renewable energy power in the country's resource-rich, underdeveloped northwestern region must be sent to the resource-scarce, prosperous coastal area," said Wang Zhongyong, renewable energy director at the National Development and Reform Commission's Energy Research Institute, according to Xinhua.
The relative independence of regional grids made such transmission difficult, Wang said.
China must develop more efficient "smart grids" as part of the solution, said Xiao Liye, director of the Institute of Electrical Engineering of the Chinese Academy of Sciences.
The new requirement will also benefit China's massive new nuclear power plants, although nuclear power is usually cheap enough to be competitive on its own.
Grid operators refusing to buy power produced by renewable energy generators could be fined up to double the loss suffered by the renewable energy generator, the amendment said.
China's target is for renewable energy sources to make up 15 percent of its power generation by 2020, up from about 9 percent currently. It also targets a reduction in carbon intensity, or the amount of carbon produced per unit of GDP, of between 40 and 45 percent by 2020 compared with 2005.