[Heller Ehrman White & McAuliffe Letterhead] EXHIBIT 5.1 March 2, 2000 Maxygen, Inc. 515 Galveston Drive Redwood City, California 94063 22800-0001 Re: Registration Statement on Form S-1 Dear: Ladies and Gentlemen: We have acted as counsel to Maxygen, Inc., a Delaware corporation (the "Company"), in connection with the Registration Statement on Form S-1 to be filed with the Securities and Exchange Commission on March 3, 2000 (as may be further amended or supplemented, the "Registration Statement") for the purpose of registering under the Securities Act of 1933, as amended, 1,725,000 shares of its authorized but unissued Common Stock, par value $.0001 per share (the "Shares"). The Shares, which include up to 225,000 shares of the Company's Common Stock issuable pursuant to an over-allotment option granted to the underwriters, are to be sold pursuant to an Underwriting Agreement (the "Underwriting Agreement") among the Company and Goldman, Sachs & Co., Robertson Stephens, Invemed Associates and Credit Suisse First Boston, as representatives of the several underwriters named in Schedule I to the Underwriting Agreement. We have assumed the authenticity of all records, documents and instruments submitted to us as originals, the genuineness of all signatures, the legal capacity of natural persons and the conformity to the originals of all records, documents and instruments submitted to us as copies. In rendering our opinion, we have examined the following records, documents and instruments: (a) The Amended and Restated Certificate of Incorporation of the Company, certified by the Delaware Secretary of State as of March 2, 2000, and certified to us by an officer of the Company as being complete and in full force as of the date of this opinion; (b) The Amended and Restated Bylaws of the Company certified to us by an officer of the Company as being complete and in full force and effect as of the date of this opinion; (c) A Certificate of an officer of the Company (i) attaching records certified to us as constituting all records of proceedings and actions of the Board of Directors, including any committee Maxygen, Inc. March 2, 2000 Page 2 thereof, and stockholders of the Company relating to the Shares, and the Registration Statement, and (ii) certifying as to certain factual matters; (d) The Registration Statement; and (e) A letter from ChaseMellon Shareholder Services, L.L.C., dated as of March 2, 2000, as to the number of shares of the Company's Common Stock that were outstanding on March 1, 2000. This opinion is limited to the federal law of the United States of America and the General Corporation Law of the State of Delaware, and we disclaim any opinion as to the laws of any other jurisdiction. We further disclaim any opinion as to any other statute, rule, regulation, ordinance, order or other promulgation of any other jurisdiction or any regional or local governmental body or as to any related judicial or administrative opinion. Based upon the foregoing and our examination of such questions of law as we have deemed necessary or appropriate for the purpose of this opinion, and assuming that (i) the Registration Statement becomes and remains effective during the period when the Shares are offered and sold, (ii) the Underwriting Agreement signed by the parties thereto conforms in all material respects to the draft filed as Exhibit 1.1 to the Registration Statement, (iii) the currently unissued Shares to be sold by the Company are issued, delivered and paid for in accordance with the terms of the Underwriting Agreement, (iv) appropriate certificates evidencing the Shares will be executed and delivered by the Company, and (v) all applicable securities laws are complied with, it is our opinion that, when issued by the Company, the currently unissued Shares covered by the Registration Statement will be legally issued, fully paid and nonassessable. This opinion is rendered to you in connection with the Registration Statement and is solely for your benefit. This opinion may not be relied upon by you for any other purpose, or relied upon by any other person, firm, corporation or other entity for any purpose, without our prior written consent. We disclaim any obligation to advise you of any change of law that occurs, or any facts of which we may become aware, after the date of this opinion. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, /s/ Heller Ehrman White & McAuliffe