Sweden's first female Prime Minister resigns hours after appointment
Instead, parliament voted for a budget drawn-up by the opposition which includes the anti-immigrant far right.
"I have told the speaker that I wish to resign," Ms Andersson told reporters.
Her coalition partner, the Greens Party said it could not accept a budget "drafted for the first time with the far right".
Ms Andersson said that she hoped to to try to become prime minister again as a single party government leader.
"There is a constitutional practice that a coalition government should resign when one party quits," the Social Democrat said on Wednesday. "I don't want to lead a government whose legitimacy will be questioned.
The speaker of parliament said he would contact party leaders on the next move.
Ms Andersson was elected as prime minister earlier on Wednesday because under Swedish law, she only needed a majority of MPs not to vote against her.
A hundred years after Swedish women were given the vote, the 54-year-old Social Democrat leader was given a standing ovation by sections of the parliament, or Riksdag. ■