Joaquim Levy has decided to leave after disagreements with the president and the governing Worker’s Party over his austerity policies.
He is being replaced by a close ally of Ms Rousseff, the current Planning Minister Nelson Barbosa.
Brazil is facing its worst recession in 25 years.
In a statement, Mr Levy said he remained confident that the economy could recover in 2016.
“Time will show that we will reap the results of all that has been done this year, putting the Brazilian economy back on track,” he wrote.
‘Control government spending’
The economy shrank by 1.7% in the third quarter of the year compared with the second quarter. Compared with a year ago, the economy is 4.5% smaller.
Inflation is also on the rise, with the annual rate hitting 10% in November.
Mr Levy’s resignation is a huge blow to those who advocated tougher budgets and limited austerity to tackle Brazil’s deepening economic crisis, says the BBC’s Wyre Davies in Rio de Janeiro
His attempts to tighten government budgets were repeatedly blocked by Worker’s Party stalwarts in Congress, adds our correspondent.
But the new minister says he will keep a tight control on public spending.
“If we control government spending we will manage to control public debt and we will eventually be able to reduce public debt,” said Mr Barbosa.
Inflation is expected to begin falling next year, he added.
The president gave no reason for Mr Levy’s departure.
The change comes amid a serious political crisis in Brazil.
Earlier this month the Speaker of the lower house of Congress, Eduardo Cunha, agreed to begin impeachment proceedings against President Rousseff over alleged irregularities in the management of last year’s budget.
On Friday, however, the Supreme Court handed Ms Rousseff an important victory.
It scrapped a commission set up to deal with impeachment proceedings against the president, in a major setback for the opposition.
The court also gave more powers to the government-controlled Senate to block the impeachment process.
The ruling means that proceedings initiated earlier this month will have to start from scratch.