Liberal MLC Peter Phelps has quit as government whip in the upper house and crossed the floor on a bill which forces small petrol stations to sell an ethanol blend for the first time.

On Tuesday Mr Phelps told the Parliament that he had enjoyed the "great pleasure" of being the party whip for the past five years.

Peter Phelps said the bill was an egregious breach of the core values of the Liberal Party.

"I have on occasion had to haul my principles," he said. "But this bill which criminalises people for the purchasing decisions of their customers is such an egregious breach of the core values of the Liberal Party that I cannot support it."

Mr Phelps crossed the floor on the bill, which was supported by Labor and opposed by the Greens.