Barack Obama was speaking after the House of Representatives passed a Senate-backed bill by 257 votes to 167.
It raises taxes for the wealthy and delays spending cuts for two months.
There had been intense pressure for the vote to be passed before financial markets reopened on Wednesday.
In Tuesday night’s house vote, 172 Democrats and 85 Republicans voted in favor of the bill.
A majority of Republicans, 151 in total, voted no, along with 16 Democrats.
The bill had been passed in the Senate less than 24 hours earlier by 89 votes to eight after lengthy talks between Vice-President Joe Biden and Senate Republicans.
Asian markets have responded positively to the move, with Hong Kong’s Hang Seng index up 2.1% on Wednesday morning, while South Korea’s Kospi added 1.7% and Australia’s ASX 200 rose 1.2%.
Speaking before returning to Hawaii for his interrupted Christmas holiday, Barack Obama said that in signing the law he was fulfilling a campaign pledge.
“I will sign a law that raises taxes on the wealthiest 2% of Americans… while preventing a middle-class tax hike,” he told a White House press conference.
The US deficit was still too high, Barack Obama said: “While open to compromise on budgetary issues, he would not offer Congress spending cuts in return for lifting the government’s borrowing limit, known as the debt ceiling.”
“There is a path forward, if we focus not on politics, but on what’s right for the country,” he added.
The “fiscal cliff” measures – cutting spending and increasing taxes dramatically – came into effect automatically at midnight on Monday when George W. Bush-era tax cuts expired.
The 1st of January deadline triggered tax increases of about $536 billion and spending cuts of $109bn from domestic and military programmes.
Economists had warned that if the full effects of the fiscal cliff were allowed to take hold, the resulting reduction in consumer spending could have sparked a new recession.
The compromise deal extends the tax cuts for Americans earning under $400,000 – up from the $250,000 level Democrats had originally sought.
In addition to the income tax rates and spending cuts, the package includes:
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…