This is actually the opposite of what happened. The Greek government, which was already virtually bankrupt in 2010, took a 110b EUR loan from the IMF on very harsh conditions, and Varoufakis was very vocal against it at that point already.
He was appointed Minister of Finance, he simply tried to renegotiate the terms of the deal, which the other involved parts refused.