<PAGE>

                                                                   EXHIBIT 10.17

                        EXCLUSIVE CONSULTING AGREEMENT
                        ------------------------------


     This Exclusive Consulting Agreement ("Agreement") entered into by and
between Maxygen, Inc. (hereinafter "Maxygen"), a Delaware corporation, and
Joseph A. Affholter, Ph.D. (hereinafter "Consultant"), an individual.

     In consideration of the promises set forth below, the parties agree as
follows.

     1.   Term of this Agreement.  This Agreement will be effective as of the
date set forth below and will continue in effect until June 30, 2001, unless it
is terminated in accordance with the provisions of Paragraph 8, below ("Contract
Term").

     2.   Services to be Performed by Consultant.  Consultant agrees to provide
those services specified in Exhibit A to this Agreement.  Written requests or
approvals for services to be conducted by Consultant under this Agreement may be
given by:  Maxygen's CEO, President, General Counsel, VP of Business
Development, Intellectual Property Counsel and/or chemical business management.
Such requests may be received by e-mail, fax or written letter.

     3.   Relationship of the Parties.

          a.  The parties intend to create an independent contractor and
principal relationship by this Agreement. Consultant will not represent himself
as an agent, employee, joint venturer or partner of Maxygen. Notwithstanding the
above, Maxygen acknowledges Consultant as an expert in the field of directed
molecular evolution and recognizes Consultant's right to use data in the public
domain (which Consultant does not otherwise have an obligation to maintain in
confidence) to highlight the relevance of directed molecular evolution
technologies in multiple industries.

          b.  The conduct and control of the work performed pursuant to this
Agreement will lie with Consultant.  However, Consultant will perform this work
at the specific direction (though not control) of Maxygen.

          c.  (i)   During the first six (6) months of the Contract Term,
subject to Consultant's obligations under Paragraph 7 of the Agreement,
Consultant may perform services for other clients, persons or companies as
Consultant sees fit, except that Consultant may not knowingly accept employment
with, perform services for, become a founder of, or engage in any conduct, role
or capacity in which the Consultant would provide to any business entity any
technical or business advice or information related to the development or use of
(x) technologies commonly referred to as "gene shuffling" or "molecular
breeding" in any format including, without limitation, single gene, gene family,
or whole genome-based formats, or (y) other novel methods for generating high-
quality genetic diversity via directed evolution of genetic materials.

              (ii)  During the portion of the Contract Term after the date six
(6) months from the start of the Contract Term, subject to Consultant's
obligations under Paragraph
<PAGE>

7 of the Agreement, Consultant may perform services for other clients, persons
or companies as Consultant sees fit, except that Consultant may not knowingly
accept employment with, perform services for, become a founder of, or engage in
any conduct, role or capacity in which the Consultant would provide to any
business entity any technical advice or information related to the development
or use of in vitro or in vivo recombination-based methods for directed molecular
          -- -----    -- ----
evolution, without limitation those commonly referred to as "gene shuffling" or
"molecular breeding," in any format; however, during such period Consultant may
(provided he does not disclose or use any Confidential Information of Maxygen)
provide advice regarding targets to which directed molecular evolution could be
applied to develop commercial products or processes, without providing technical
advice or information on how to accomplish the same.

              (iii) Notwithstanding Paragraphs 3.C(i) and (ii) above, Consultant
may (x) conduct the activities described therein (without any disclosure or use
of Maxygen Confidential Information) to the extent that Consultant can
reasonably demonstrate that he could have done so prior to his employment with
Maxygen, and (y) Consultant may comment generally on benefits of using Maxygen
technology by reference to information then within the public domain.

              (iv)  If during the Contract Term Consultant wishes to conduct any
activity which he believes may fall within the scope of the then-prohibited
activities described in Paragraphs 3.C(i) or (ii) above, he shall provide to
Maxygen notice describing in writing the activities he wishes to conduct, but
shall have no obligation to disclose to Maxygen the confidential information of
third parties.  Maxygen shall within ten (10) business days of receipt of such
notice and information notify Consultant in writing whether or not he may
conduct such activities for such third party; provided, such time period shall
not apply if the Consultant has failed to provide Maxygen sufficient detail
regarding the proposed activities to reasonably allow it to evaluate the impact
of Consultant's proposed activities on Maxygen.  In the event Maxygen declines
to permit Consultant to perform the proposed activities, it will summarize in
brief written form the basis for its denial and, where feasible, provide
positive guidance as to changes in the proposed activities which could make the
proposed activity acceptable, provided Maxygen has no obligation to approve any
activities which are not expressly permitted by Paragraphs 3.C(i) or (ii) above.
Unless agreed to otherwise by the Parties in writing, a failure of Maxygen to
provide a response within the specified 10 business day period, shall constitute
approval of the proposed activity.

     4.   Benefits.  Consultant will not be eligible for, nor will participate
in, any health, pension, or other employee benefit plan sponsored or established
by Maxygen for the benefit of its employees.

     5.   Billings.  Consultant agrees to submit to the Controller of Maxygen,
Inc., at 515 Galveston Drive, Redwood City, California 94063, by the tenth day
of each calendar month, in a form reasonably acceptable to Maxygen, a written
invoice or facsimile that sets forth (i) the number of hours worked by
Consultant each day, together with a detailed description of the services
performed, including time and expenses for agreed-upon travel, and (ii) the
total compensation owed for the month.
<PAGE>

     6.   Compensation to Consultant.  Maxygen will pay Consultant for services
requested by Maxygen and actually performed by Consultant, at the rate of $250
per hour, but in no event fewer than forty hours per month for the months of
February, March, April and May 2000, twenty-five hours per month for the months
of June and July 2000, and five hours per month thereafter for the remainder of
the Contract Term (the "Consulting Fees").  Consultant is not expected to be
available on an "on-call" basis, but will be available for business meetings and
travel at agreed-upon times, and will be given notice of upcoming travel and
Maxygen's consulting needs as far in advance as reasonably practical (generally
ten business days or more).  Nothing herein shall be interpreted as requiring
Consultant to provide more than the above-described minimum number of consulting
hours per month.  Maxygen agrees to make Payment no later than 30 days after
receipt of the invoice in the form described in Paragraph 5 above.  No payments
will be made to Consultant as reimbursement for travel and other business
expenses unless agreed in advance in writing by Maxygen.  In addition, upon
approval of the Board of Directors of Maxygen, on June 30, 2001, Maxygen will
vest in Consultant 6,875 Stock Options at an exercise price of $0.30, which
options otherwise would have vested had Consultant been an employee of Maxygen
on April 29, 2000, provided that this Agreement has not been terminated prior to
June 30, 2001 pursuant to Paragraph 8 of this Agreement either (i) for cause by
Maxygen, or (ii) for any reason by Consultant.  Consultant understands and
agrees that because of his separation from employment with Maxygen, his
continuing option will become a Non-statutory Option and will no longer be an
Incentive Stock Option.  Consultant further understands and agrees that the only
option that will continue to vest during the Contract Term will be for the
aforesaid 6,875 options.

     7.   Confidential Information.

          a.  Maxygen has and will develop, compile, and own certain proprietary
techniques and confidential information ("Confidential Information") that have
great value in its business.  Consultant acknowledges and agrees that
Confidential Information includes information Consultant learns or acquires in
connection with the performance of services under this Agreement.  Confidential
Information includes all information that has or could have commercial value or
other utility in the business in which Maxygen is engaged, or in which it
contemplates engaging, or that Maxygen has acquired in confidence from third
parties.  Confidential Information also includes all other non-public
information of Maxygen or third parties disclosed to Maxygen in confidence, the
unauthorized disclosure of which could be detrimental to the interests of
Maxygen, whether or not this information is identified as Confidential
Information.  Confidential Information also includes all information that
Consultant may have learned about Maxygen's business, operations or plans during
the negotiation of this Agreement or during his prior employment with Maxygen.
Confidential Information also includes all information defined as "Confidential
Information" in the Maxygen Confidential Information, Secrecy and Inventions
Agreement signed by Consultant on April 29, 1998 ("the CI Agreement").
Consultant agrees to continue to be bound by the CI Agreement, including but not
limited to the Inventions portion thereof, and acknowledges that the CI
Agreement remains in all respects valid and in force, throughout and after the
Contract Term.

          b.  By example and without limitation, Confidential Information
includes any and all information concerning Maxygen's research programs, product
development, biological materials, research methods, related products,
technology, inventions, patent applications, trade
<PAGE>

secrets or other products and any other information of value relating to the
business affairs and/or fields of interest of Maxygen, whether communicated
orally or in writing, including without limitation, concepts, techniques,
processes, designs, biological materials, methods for developing or identifying
novel products, software, databases, cost data, and other technical know-how,
financial, research, marketing and personnel information, and other business
information including information with respect to which Maxygen is under an
obligation of confidentiality with any third party. Confidential Information
does not include information: (i) generally known in the relevant trade or
industry; or (ii) known to and freely usable by Consultant before entering into
this Agreement with Maxygen; but Confidential Information shall not be deemed to
be generally known (x) merely because it is embraced by more general information
subject to the above, or (y) merely because it is published in general terms
without description of the specific Confidential Information subject to this
section.

          c.  Consultant acknowledges and agrees that Confidential Information
is proprietary, constitutes a valuable asset of Maxygen, and is the sole
property of Maxygen. Consultant agrees that at all times during and after the
Contract Term, he will hold in trust, keep confidential, and not disclose to any
third party, or make any use of, the Confidential Information of Maxygen, except
as is strictly required to perform services under this Agreement and with the
prior written approval of Maxygen. Consultant further agrees not to disclose, or
to cause the transmission, removal, or transport of, Confidential Information
from Maxygen's principal place of business at 515 Galveston Drive, Redwood City,
California 94063, or any other place of business; provided, Consultant may
communicate freely with Maxygen.

          d.  Consultant acknowledges that all documents, whether in hard copy,
electronic for or any other format, including, but not limited to, laboratory
and other notebooks, software, computer programs, tapes, printouts, records,
databases, manuals, letters, email messages, reports, blueprints, drawings,
customer lists, and other evidence of Confidential Information and other
information concerning the business, operation, or plans of Maxygen, including
copies, that come into the possession of Consultant, whether produced by
Consultant or others are and will remain the property of Maxygen, and will be
treated as Confidential Information.

          e.  Consultant acknowledges that the unauthorized use or disclosure of
Maxygen's Confidential Information by Consultant may lead to immediate
termination of this Agreement under Paragraph 8, and can lead to legal action by
Maxygen.

          f.  Notwithstanding the foregoing, it is understood that, by virtue of
his former employment with Maxygen and his ongoing consultancy with Maxygen
under this Agreement, Consultant will continue to have in his possession
Confidential Information of Maxygen. Consultant agrees to treat such information
as provided in the CI Agreement.

     8.   Termination of this Agreement.

          a.  On Written Notice. Either party may terminate this Agreement,
without cause, by giving thirty (30) days' notice to the other party. In the
event of such termination, the parties agree to act toward each other in good
faith during the notice period. In the event of such termination by Maxygen, the
stock options referred to in Paragraph 6 shall vest as of the
<PAGE>

effective date of termination. If this Agreement is terminated by Maxygen for
any reason other than for cause or for any reason by Consultant prior to July 1,
2000, Maxygen agrees to pay the minimal Consulting Fees that would have been
payable through July 31, 2000.

          b.  For Cause. Either party may terminate this Agreement for cause,
effective immediately, upon written notice of termination for cause to the other
party. In the event of such termination by Maxygen, the stock options referred
to in Paragraph 6 shall be forfeited. For purposes of this Agreement, "cause"
includes but is not limited to:

              1)    Any material breach of this Agreement, including but not
limited to inducing or assisting infringement of any Maxygen patent or copyright
misappropriation of any Maxygen trade secret; and

              2)    Any act by one party that exposes the other to potential
liability to others for, among other things, personal injury, property damage,
patent infringement or trade secret misappropriation.

          c.  In the event of termination of this Agreement, Maxygen agrees to
pay for all services provided under this Agreement to the effective date of the
termination.

     9.   Indemnification.

          a.  Consultant will indemnify, defend, and hold harmless Maxygen, its
directors, officers, employees, agents and assigns against any and all liability
imposed or claimed, including attorneys' fees and other legal expenses, arising
directly or indirectly from any act or failure to act by Consultant in
connection with the performance of services under this Agreement.

          b.  Consultant will indemnify, defend and hold Maxygen harmless
against any and all liability imposed or claimed, including attorneys' fees and
other legal expenses, arising directly or indirectly from any violation of
federal, state or local law by Consultant in connection with the performance of
services under this Agreement, including but not limited to, the California Fair
Employment and Housing Act, Title VII of the Civil Rights Act of 1964, the Age
Discrimination in Employment Act, and the Americans with Disabilities Act.

          c.  Maxygen will have no duty to indemnify or defend Consultant.

     10.  Severability. Whenever possible, each provision of this Agreement will
be interpreted in such a manner as to be effective and valid under applicable
law. If any provision of this Agreement is held by a court of competent
jurisdiction to be invalid, void, or unenforceable, the remaining provisions
will nevertheless continue in full force without being impaired or invalidated
in any way.

     11.  Governing Law. This Agreement will be construed in accordance with the
law of the State of California without reference to principles of conflicts of
laws.
<PAGE>

     12.  Waiver. The waiver by either party of a breach of any provision of
this Agreement will not operate, or be construed, as a waiver of any subsequent
breach by the other party.

     13.  Assignment.  Consultant agrees that he will not assign this Agreement,
nor any duties or obligations under it, without the prior written consent of
Maxygen.  Maxygen shall have the right to assign this Agreement.

     14.  Notices.  All notices or other written communications provided for
under this Agreement will be in writing and will be deemed to have been given
either (i) upon personal delivery or confirmed facsimile transmission, (ii) one
day after deposit with a courier service for next day delivery, or (iii) five
days after deposit in the U.S. mail, registered mail--postage prepaid, to the
following addresses.

          a.  Joseph A. Affholter, Ph.D.
              17440 Lakeview Drive
              Morgan Hill, CA 95037

              Facsimile Number:  408/779-3580

          b.  Maxygen, Inc.
              515 Galveston Drive
              Redwood City, California 94063
              Attention: General Counsel

              Facsimile Number: 650/298-5803

     Either party may change its or his address by giving notice to the other
party in accordance with this paragraph.

     15.  Entire Agreement.  Except as provided in Paragraph 7.a above and the
separation letter, this Agreement supercedes any and all other agreements, both
oral or written, between Consultant and Maxygen with respect to the subject
matter of this Agreement, and the Agreement contains all of the promises and
agreements between the parties with regard to its subject matter.  Both
Consultant and Maxygen acknowledge that no representations, inducements,
promises, or agreements, oral or otherwise, have been made by the other party,
or anyone acting on behalf of the party, that are not contained in this
Agreement.  The parties also acknowledge that no agreement, statement or promise
that is not referenced or contained in this Agreement will be valid or binding.
Any modification of this Agreement will be effective only if it is in writing
and signed by Consultant and an authorized representative of Maxygen.

     16.  Arbitration of Disputes.  The parties agree that any controversy or
claim arising out of this Agreement, or any alleged breach of this Agreement,
will be subject to good faith mediation between the parties on mutually
acceptable terms.  Any remaining claim or controversy will be arbitrated in San
Francisco, California, before a single arbitrator, in accordance with the
Commercial Dispute Resolution Rules of the American Arbitration
<PAGE>

Association then in effect. The arbitrator's decision will be final and binding
on both parties. The prevailing party will be entitled to reasonable costs and
attorneys' fees, including expert witness fees.

     17.  Injunctive Relief.  Notwithstanding Paragraph 16, Consultant agrees
that a breach by him of his obligations under Paragraph 7 of this Agreement
relating to Confidential Information will cause Maxygen irreparable injury and
damage.  Consultant agrees that Maxygen is entitled to injunctive and other
equitable relief to prevent a breach of Paragraph 7 of the Agreement or to
secure its enforcement.  A request for equitable relief by Maxygen shall not be
a waiver of any other rights or remedies Maxygen or Consultant may have.

     18.  Attorneys' Fees.  If any legal action is brought that arises out of or
relates to this Agreement, including an action for injunctive relief, the
prevailing party will be entitled to reasonable attorneys' fees, which may be
set by the court in the same action or in a separate action brought for that
purpose, in addition to any other relief to which that party may be entitled.

     Executed on the dates set forth below.



Dated: January 28, 2000             /S/ Joseph A. Affholter, Ph.D.
      ------------------------      ----------------------------




Dated: January 28, 2000             MAXYGEN, INC.
      -------------------------


                                    By /s/ Russell Howard
                                    -----------------------------------------
                                           Russell Howard
                                           President and Chief Executive Officer
<PAGE>

                                   Exhibit A

                               Contract Services
                               -----------------


1.   Advice regarding the development of technologies relating to directed
evolution, gene shuffling and Molecular Breeding directed molecular evolution
technologies, and the use of such technologies to develop products and processes
using such technologies for commercial uses.

2.   Transitioning to new leadership within Maxygen all existing partner
management responsibilities, projects, initiatives, and potential business
partner communications in which consultant was involved or engaged while an
employee of Maxygen.

3.   Assisting in establishing new collaborative relationships between Maxygen
and third parties.

4.   Cooperation with Maxygen and its counsel in connection with any
intellectual property disputes with third parties in which Maxygen may become
engaged, which cooperation shall include not providing advice or guidance to any
third party with respect to any intellectual property dispute involving any type
of directed molecular evolution without Maxygen's prior written consent.

5.   Other services to be determined at the parties' mutual written consent.