Despite inflation soaring to a 40-year high, a non-binding motion calling for the one-off tax was defeated by 297 votes to 241.
All the MPs who voted against were Conservatives, including Mr Anderson, and no Conservatives voted in favour.
Following the vote, Shadow climate change minister Ed Miliband said: “Every Conservative MP who voted against the windfall tax tonight has condemned millions of families to misery and anxiety as they struggle to pay their energy bills.
“Tonight a message has been sent by the government that they will do everything they can to protect the oil and gas companies, and refuse to act to protect families.”
The MP has also been criticised locally for his decision to vote against the bid, with Ashfield District Council leader Jason Zadrozny expressing his disappointment.
“The reality is that his comments about food banks insulted everyone,” he said.
“And this vote is, in my view, even worse.
“Ashfield residents have been in touch to condemn Anderson in droves. He had a chance to actually do something about the cost of living and failed again.
“He has put his career first instead of his residents living on the breadline. The residents of Ashfield will not forget nor forgive this.”
But Mr Anderson has defended his decision to vote against the bid and said he is lobbying for a more “long term solution”.
He said: “The Chancellor has not ruled out a windfall tax but it has to be done in the right way to benefit everyone who is struggling to pay their bills.
“MPs do not vote against their own Queen’s Speech, which is why Labour’s amendment was voted down.
“I welcome a windfall tax in the short term to help struggling families. But, just a few years ago, oil and gas producers made massive losses so where would the lost revenue come from in that case?
“I am lobbying to get the green levy and VAT scrapped on fuel, which is a genuine long term solution for my friends, family and constituents in Ashfield.”