The US and China - together responsible for 40 percent of the world's carbon emissions - have both formally joined the Paris global climate agreement.
After arriving with other leaders of G20 nations for a summit in the city of Hangzhou, Mr Obama said: "History will judge today's effort as pivotal."
CO2 emissions are the driving force behind climate change.
Last December, countries agreed to cut emissions in a bid to keep the global average rise in temperatures below 2°C.
The Paris deal is the world's first comprehensive climate agreement. It will only come into force legally after it is ratified by at least 55 countries, which between them produce 55 percent of global carbon emissions.
New Zealand has not yet ratified but the government says it plans to do so by the end of the year.
Members of China's National People's Congress Standing Committee adopted "the proposal to review and ratify the Paris Agreement" on Saturday morning at the end of a week-long session.
Before China made its announcement, the 23 nations that had so far ratified the agreement accounted for just over one percent of emissions.
The UK has yet to ratify the Paris deal. A spokesman for the prime minister said the government would ratify as soon as possible - but gave no date.
The White House issued a statement on Saturday morning announcing the US move.
In a speech in Hangzhou, Mr Obama said the Paris deal was the "single best chance to deal with a problem that could end up transforming this planet".
He praised US and Chinese leadership on the climate issue, saying: "We are moving the world significantly towards the goal we have set."
UN Secretary General Ban Ki-moon praised Mr Obama for what he called "inspiring" leadership.
Mr Ban said Mr Obama and China's President Xi Jinping had both been "far-sighted, bold and ambitious".
However, analysts warn that the target of keeping temperature rises below 2° is already in danger of being breached.
For 14 consecutive months meteorologists have recorded the hottest month on record, and the UK's Met Office has forecast that 2016 is likely to hit temperatures 1.1° above pre-industrial levels.
Average temperatures worldwide are likely to increase even further in the coming years as the effect of previous carbon emissions makes itself felt.
Environmental campaigning group Friends of the Earth welcomed the move by China and the US.
But spokesman Asad Rehman added: "The Paris agreement is a step in the right direction, but the reality is it's too weak and delays action to the next decade.
"What's needed is comprehensive and urgent action now to slash emissions and build a low-carbon future."
The G20 summit in Hangzhou starts on Sunday.
This is expected to be Mr Obama's last trip to Asia as US president.
However, as he arrived there was a security dispute on the tarmac at Hangzhou airport as White House officials, including National Security Adviser Susan Rice, and reporters tried to get closer to the president. A Chinese official shooed them away shouting: "This is our country! This is our airport!"
Paris agreement: Key points
- To keep global temperature increase "well below" 2C and to pursue efforts to limit it to 1.5°C
- To peak greenhouse gas emissions as soon as possible and achieve a balance between sources and sinks of greenhouse gases in the second half of this century
- To review progress every five years
- $100bn a year in climate finance for developing countries by 2020, with a commitment to further finance in the future
- Once the deal comes into force, countries that have ratified it have to wait for a minimum of three years before they exit
- BBC