Varoufakis said Prime Minister Alexis Tsipras had judged that his resignation "might help achieve a deal" and that he was leaving the finance ministry for that reason.
"I shall wear the creditors' loathing with pride," Varoufakis said in his announcement.
Greeks voted overwhelmingly to reject creditors' proposal of more austerity measures in return for rescue loans, in the country's first referendum in 41 years Sunday.
The referendum "will stay in history as a unique moment when a small European nation rose up against debt-bondage," Varoufakis said.
With his brash style and fondness for frequent media appearances at the start of his tenure at the ministry when the new government was formed in January, Varoufakis had visibly annoyed many of the eurozone's finance ministers during Greece's debt negotiations.
There was no immediate announcement of his replacement.
Tsipras was elected on promises to repeal the austerity demanded in return for a bailout from other eurozone countries and the International Monetary Fund, and negotiations broke down late last month after dragging on unsuccessfully for five months.
With his high-stakes gamble to call a referendum on creditor proposals with just a week's notice, Tsipras aimed to show creditors that Greeks, whose economy has been shattered and who face spiralling unemployment and poverty, have had enough and that the austerity prescribed isn't working.
But everything will hinge on the reaction by his European partners. A eurozone summit was hastily called for Tuesday afternoon to discuss the situation.
Greeks awoke Monday to the stark reality of the country's accelerating crisis - shuttered banks and ATMs with little cash.
The referendum results — 61 per cent voted "no" and 39 per cent "yes" — left the bankrupt country's future in the European Union and its euro currency uncertain.
The margin of victory for "no" was far wider than expected. But as celebrations died down early Monday, Greece entered a second week of severe restrictions on financial transactions and faced even limited amounts of cash drying out, with no prospect of an immediate infusion.
Story Continues After Slideshow
Greece imposed the restrictions to stem a bank run after the vote was called and its bailout program expired.
Besieged by a prolonged recession, high unemployment and banks dangerously low on capital, Greece defaulted on an IMF loan repayment last week, becoming the first developed nation to do so. Now some analysts wonder if Greece is so starved of cash that it could be forced to start issuing its own currency and become the first country to leave the 19-member eurozone, established in 1999.
Asian markets mostly fell Monday, as economists said the markets were not expecting such a decisive "no" vote.
The European Central Bank's governing council was not expected to provide more liquidity assistance to Greek banks Monday. The assistance, now at about 90 billion euros, has been maintained but not increased in past days, leaving the country's financial system in a stranglehold. Without an increase, Greeks might not be able to withdraw even the meagre 60 euros ($67) allocated per day.
That will make it difficult for Tsipras to keep his pledge, expressed on TV and on his Twitter account, that Greece's "immediate priority is to restore our banking system's functioning & economic stability" or for banks to re-open Tuesday, as scheduled.
Negotiations on a financial rescue package broke off with Greece's creditors after Tsipras called for the referendum. It is unclear when they could restart, but the government has said it believes a deal with creditors could be reached within 48 hours of the vote.
Leaders of six of the seven parties represented in Parliament were meeting Monday morning in the presidential palace. Tsipras requested the meeting to share his negotiating strategy and call for support.
The main opposition party, New Democracy, was sending an interim chief, after its leader - former Prime Minister Antonis Samaras — resigned Sunday as "no" votes poured in.
German Chancellor Angela Merkel and French President Francois Hollande spoke to each other Sunday night and agreed "that the vote of the Greek people must be respected," Merkel's office said.
Jeroen Dijsselbloem, the Eurogroup head, said Sunday's referendum result was "very regrettable for the future of Greece."
The Dutch finance minister had been a steadfast opponent of Greece as it sought better conditions during five months of bailout negotiations. "For recovery of the Greek economy, difficult measures and reforms are inevitable," he said. "We will now wait for the initiatives of the Greek authorities."
Sigmar Gabriel, Germany's vice chancellor and economic minister, told a German newspaper the Greek government was leading its people "onto a path of bitter austerity and hopelessness."
Belgian Finance Minister Johan Van Overtveldt was somewhat softer in his approach, saying a "no" result "complicates matters," but that the door remained open to resume talks immediately.
"What we certainly don't want to do is to take decisions that will threaten the monetary union," he told Belgium's VRT. "Within that framework we can start talks again with the Greek government, literally, within hours."
Canadian Finance Minister Joe Oliver said in a statement that Canada continues to monitor the situation closely.
"I am confident in the capacity and commitment of the European authorities to maintain the stability of the Eurozone as a whole," Oliver said.
"We encourage the Greek government and its European partners to re-engage as quickly as possible to find a constructive resolution to this crisis."
Derek Gatopoulos, Costas Kantouris and Menelaos Hadjicostis in Athens, Raf Casert in Brussels, Frank Jordans in Berlin and Carlo Piovano in London contributed to this report.