Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” and to the use of our report dated April 10, 2008, in Amendment No. 1 to the Registration Statement (Form S-1 No. 333-150224) and related Prospectus of Codexis, Inc. for the registration of shares of its common stock.

/s/ Ernst & Young LLP

Palo Alto, California

July 31, 2008