EXHIBIT 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM The Board of Directors Pacific Ethanol, Inc. We consent to the incorporation by reference in this Post-Effective Amendment No. 1 to Registration Statement on Form S-1 (333-127714) on Form S-3 of Pacific Ethanol, Inc. of our report dated April 14, 2006, relating to our audits of the consolidated financial statements, which appear in the December 31, 2005 annual report on Form 10-KSB of Pacific Ethanol, Inc. We also consent to the reference to our firm under the caption "Experts" in such Prospectus. /s/ HEIN & ASSOCIATES LLP Hein & Associates LLP Irvine, California April 19, 2006