EXHIBIT 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM The Board of Directors Pacific Ethanol, Inc. We consent to incorporation by reference in the Registration Statements (Nos. 333-106554, 333-123538 and 333-123539) on Form S 8 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. /s/ HEIN & ASSOCIATES LLP Hein & Associates LLP Irvine, California April 14, 2006