<PAGE>
                                                                   Exhibit 10.18

                                [XENOPORT LOGO]

                          RIEFLIN EMPLOYMENT AGREEMENT

      This Agreement is entered into as of June 18, 2004, by and between
XenoPort, Inc. (the "COMPANY"), and William J. Rieflin ("EXECUTIVE").

      1. Duties and Scope of Employment.

            (a) Effective Date. Executive will commence employment with the
Company on the "EFFECTIVE DATE," which shall be the later of (i) August 31, 2004
or (ii) one month following the closing of the acquisition of Tularik Inc. by
Amgen Inc. In the event that the closing of the acquisition of Tularik Inc. by
Amgen Inc. does not occur by September 30, 2004, this Agreement automatically
shall be deemed rescinded and terminated (with no obligations due by either
party) by both the Company and Executive, unless both the Company and Executive
provide written authorization to the contrary.

            (b) Positions and Duties. As of the Effective Date, Executive will
serve as President of the Company. Executive will render such business and
professional services in the performance of his duties, consistent with
Executive's position within the Company, as will reasonably be assigned to him
by the Company's Board of Directors (the "BOARD"). These duties will initially
include responsibility for all aspects of the following operations of the
Company: legal (including intellectual property), corporate development,
business strategy, business development, human resources, facilities,
information technology, and environmental, health and safety. The Board may
modify Executive's job title and duties, in a manner consistent with Executive's
training and experience, as it deems necessary and appropriate in light of the
Company's needs and interests from time to time. The period of Executive's
employment under this Agreement is referred to herein as the "EMPLOYMENT TERM."

            (c) Obligations. During the Employment Term, Executive will perform
his duties faithfully and to the best of his ability and will devote his full
business efforts and time to the Company. For the duration of the Employment
Term, Executive agrees not to actively engage in any other employment,
occupation or consulting activity for any direct or indirect remuneration
without the prior approval of the Board. Notwithstanding the foregoing, during
the Employment Term, Executive will be permitted to serve (i) as a consultant to
Amgen Inc. with respect to Tularik Inc. matters and (ii) as a member of up to
two boards of directors; provided, however, that such outside activities will be
permitted only to the extent that they do not interfere or conflict with
Executive's performance of his duties to the Company, as reasonably determined
by the Board.

      2. At-Will Employment. The parties agree that Executive's employment with
the Company will be "at-will" employment and may be terminated at any time with
or without cause or notice. Executive understands and agrees that neither his
job performance nor promotions, commendations, bonuses or the like from the
Company give rise to or in any way serve as the basis for modification,
amendment, or extension, by implication or otherwise, of his employment with the
Company.

                                       1.
<PAGE>

                                [XENOPORT LOGO]

      3. Compensation.

            (a) Base Salary. During the Employment Term, the Company will pay
Executive an annual salary of $275,000.00 as compensation for his services (the
"BASE SALARY"). The Base Salary will be paid periodically in accordance with the
Company's normal payroll practices and be subject to the usual, required
withholding. Executive's salary will be subject to review and adjustments will
be made based upon the Company's standard practices.

            (b) Bonus. Executive will be entitled to participate in any bonus
plan adopted by the Company for its employees or executive officers on such
terms as the Board may determine in its discretion, including the existing
XenoPort, Inc. Bonus Plan. Executive's target bonus under the terms of such
Bonus Plan for 2004 equals twenty-five percent (25%) of his Base Salary.

            (c) Restricted Stock Grant. Subject to approval of the Board,
Executive will be issued 200,000 shares of the Company's Common Stock (the
"RESTRICTED STOCK") at an issue price per share equal to the par value of $0.001
per share of such Common Stock, payable by Executive at the time of issuance,
pursuant to the terms of the Company's standard restricted stock purchase
agreement (the "PURCHASE AGREEMENT"). In the event Executive's services to the
Company terminate for any reason (i) on or prior to the six-month anniversary of
the Effective Date, the Company will have the right to repurchase one hundred
percent (100%) of the Restricted Stock at the per share par value price paid by
Executive, or (ii) after such six-month anniversary but on or prior to the
one-year anniversary of the Effective Date, the Company will have the right to
repurchase fifty percent (50%) of the Restricted Stock at the per share par
value price paid by Executive; provided, however, that if Executive's services
to the Company are (1) terminated by the Company without Cause (as defined
below) or (2) terminated by Executive for Good Reason (as defined below) or as a
result of Constructive Termination (as defined below), during either of the
periods described in clause (i) or (ii) above, the Company shall not have the
right to repurchase any of the Restricted Stock. The delivery of a stock
certificate representing any applicable vested portion of the Restricted Stock
following a termination of Executive's services to the Company will be subject
to Executive signing and not revoking a separation agreement and release of
claims in a form reasonably acceptable to the Company and Executive. No
certificate representing such vested shares will be delivered until the
separation agreement and release agreement becomes effective.

            (d) Gross-Up Payment. In connection with the grant to Executive of
the Restricted Stock, Executive shall be entitled to receive an additional cash
payment (a "GROSS-UP PAYMENT") from the Company, or the Company shall pay such
amount on Executive's behalf to the applicable government agency, in the sole
discretion of the Company, in an aggregate amount sufficient to pay (i)
Executive's applicable federal and state personal income tax liability on the
initial value of the Restricted Stock (the "PRIMARY PAYMENT"), (ii) Executive's
applicable federal and state personal income tax liability on the Primary
Payment (the "SECONDARY PAYMENT") and (iii) Executive's applicable federal and
state personal income tax liability on the Secondary Payment; provided, however,
in no event shall the total Gross-Up Payment exceed $68,000. Executive shall
provide the Company with such documentation as it reasonably

                                       2.
<PAGE>

                                [XENOPORT LOGO]

requests to confirm the appropriate amount of such Gross-Up Payment and to
process the payment thereof.

            (e) Stock Options. Subject to approval of the Board, Executive will
be granted the following stock options, each of which will be, to the extent
possible under the $100,000 rule of Section 422(d) of the Internal Revenue Code
of 1986, as amended (the "CODE"), an "incentive stock option" (as defined in
Section 422 of the Code): (i) a stock option to purchase 300,000 shares of the
Company's Common Stock (as adjusted for stock splits, stock dividends and
similar events) (the "FIRST OPTION"), which will vest monthly as to 1/48th of
the shares subject to the First Option, so that the First Option will be fully
vested four (4) years from the Effective Date, subject to Executive's continued
service to the Company through the relevant vesting dates and (ii) a stock
option to purchase 400,000 shares of the Company's Common Stock (as adjusted for
stock splits, stock dividends and similar events) (the "SECOND OPTION"), which,
subject to the accelerated vesting provisions set forth herein, will cliff vest
in full on the four-year anniversary of the Effective Date, subject to
Executive's continued service to the Company through the relevant vesting dates;
provided, however, that (1) fifty percent (50%) of the shares subject to the
Second Option will accelerate and vest on the earlier to occur of the filing by
the Company of its first registration statement with the Securities and Exchange
Commission under the Securities Act of 1933, as amended, (the "REGISTRATION
STATEMENT FILING") or the closing of a Major Transaction (as defined below), and
(2) fifty percent (50%) of the shares subject to the Second Option will
accelerate and vest at the time the Company first achieves a market
capitalization of $500 million (as reasonably determined by the Board prior to
the date on which the Company's Common Stock is first traded on a national stock
exchange or quotation system, or if the Company's Common Stock is so traded,
then based on the closing sale price of the Company's Common Stock on such
exchange or system). The First Option and Second Option will have an exercise
price equal to the fair market value of the Company's Common Stock on the date
of grant as determined by the Board in its sole discretion and will be subject
to the terms, definitions and provisions of the Company's 1999 Stock Plan (the
"OPTION PLAN") and the related stock option agreements by and between Executive
and the Company (the "OPTION AGREEMENTS"), all of which documents are
incorporated herein by reference.

            (f) Loan. The Company will permit Executive to early exercise the
First Option and Second Option pursuant to restricted stock purchase agreements
and to pay the applicable exercise price (as of the date hereof estimated to be
approximately $315,000, based on the current fair market value of the Company's
Common Stock) with a full recourse promissory note that is further secured by a
pledge of the Company's Common Stock owned by Executive (the "LOAN"). The Loan,
including principal and outstanding interest thereon, will be payable by
Executive at the earlier of (i) immediately upon Executive's termination of
services to the Company or (ii) immediately prior to the Registration Statement
Filing. The Loan will be reflected in appropriate promissory note and security
agreement documentation, all of which documents are incorporated herein by
reference.

            (g) Additional Restricted Stock Grant. Subject to approval of the
Board, Executive will be issued 700,000 shares of the Company's Common Stock
(the "ADDITIONAL RESTRICTED STOCK") at an issue price per share equal to the par
value of $0.001 per share of such Common Stock, payable by Executive at the time
of issuance, pursuant to the terms of the

                                       3.
<PAGE>

                                [XENOPORT LOGO]

Company's standard restricted stock purchase agreement (the "ADDITIONAL PURCHASE
AGREEMENT"). In the event Executive's services to the Company terminate for any
reason, the Company will have the right to repurchase the Additional Restricted
Stock at the per share par value price paid by Executive; provided, however,
that the Company's right of repurchase shall lapse with respect to 1/48th of the
Additional Restricted Stock monthly, so that the Additional Restricted Stock
will be fully vested four (4) years from the Effective Date, subject to
Executive's continued service to the Company through the relevant vesting dates.

            (h) Severance Payment. If, prior to the four-year anniversary of the
Effective Date, Executive's services to the Company are (1) terminated by the
Company without Cause (as defined below) or (2) terminated by Executive for Good
Reason (as defined below) or as a result of Constructive Termination (as defined
below), Executive will be entitled to receive a lump-sum severance payment in an
amount calculated as described in the following sentence (the "SEVERANCE
PAYMENT"). At the Effective Date, the Severance Payment will initially equal
$141,435, which amount will decrease at a rate of 1/48th of such initial amount
per month following the Effective Date until the Severance Payment would equal
zero at the four-year anniversary of the Effective Date. Notwithstanding
anything to the contrary set forth herein, in the event that: (x) the shares of
Additional Restricted Stock purchased by Executive become fully vested prior to
the four-year anniversary of the Effective Date (pursuant to the Change of
Control Agreement (as defined below) or otherwise), then Executive will not be
entitled to any Severance Payment described in this Section 3(h); or (y)
Executive is entitled to receive a credit or other reimbursement from the
Internal Revenue Service for taxes paid by Executive on the Additional
Restricted Stock, the Severance Payment described in this Section 3(h) shall be
reduced on a dollar-for-dollar basis to the extent of such credit or
reimbursement. The delivery of the Severance Payment following a termination of
Executive's services to the Company will be subject to Executive signing and not
revoking a separation agreement and release of claims in a form reasonably
acceptable to the Company and Executive. No portion of the Severance Payment
will be delivered until such separation agreement and release agreement becomes
effective.

      4. Employee Benefits. During the Employment Term, Executive will be
entitled to participate in the employee benefit plans currently and hereafter
maintained by the Company of general applicability to other senior executives of
the Company. The Company reserves the right to cancel or change the benefit
plans and programs it offers to its employees at any time.

      5. Vacation. Executive will be entitled to flexible time off in accordance
with the Company's vacation policy (including, without limitation, its policy
relating to maximum accrual), with the timing and duration of specific vacations
mutually and reasonably agreed to by the parties hereto.

      6. Expenses. The Company will reimburse Executive for reasonable travel,
entertainment or other expenses incurred by Executive in the furtherance of or
in connection with the performance of Executive's duties hereunder, in
accordance with the Company's expense reimbursement policy as in effect from
time to time.

                                       4.
<PAGE>

                                [XENOPORT LOGO]

      7. Change of Control Agreement. At the Effective Date, Executive and the
Company shall enter into the Change of Control Agreement in the form attached
hereto as EXHIBIT A (the "CHANGE OF CONTROL AGREEMENT").

      8. Additional Definitions.

            (a) Cause. For purposes of this Agreement, "CAUSE" has the meaning
set forth in Section 5 of the Change of Control Agreement.

            (b) Constructive Termination. For the purposes of this Agreement,
"CONSTRUCTIVE TERMINATION" has the meaning set forth in Section 5 of the Change
of Control Agreement.

            (c) Good Reason. For the purposes of this Agreement, "GOOD REASON"
has the meaning set forth in Section 5 of the Change of Control Agreement.

            (d) Major Transaction. For the purposes of this Agreement, "MAJOR
TRANSACTION" means a transaction approved by the Board with respect to
gabapentin or baclofen.

      9. Confidential Information. Executive agrees to enter into the Company's
standard Employee Proprietary Information Agreement (the "PROPRIETARY
INFORMATION AGREEMENT") upon commencing employment hereunder.

      10. Non-Solicitation. Until the date one (1) year after the termination of
Executive's employment with the Company for any reason, Executive agrees not,
either directly or indirectly, to solicit, induce, attempt to hire, recruit,
encourage, take away, hire any employee of the Company or cause an employee to
leave his employment either to work for Executive or for any other entity or
person. Executive represents that he (i) is familiar with the foregoing covenant
not to solicit, and (ii) is fully aware of his obligations hereunder, including,
without limitation, the reasonableness of the scope of this covenant.

      11. Assignment. This Agreement will be binding upon and inure to the
benefit of (a) the heirs, executors and legal representatives of Executive upon
Executive's death and (b) any successor of the Company. Any such successor of
the Company will be deemed substituted for the Company under the terms of this
Agreement for all purposes. For this purpose, "SUCCESSOR" means any person,
firm, corporation or other business entity which at any time, whether by
purchase, merger or otherwise, directly or indirectly acquires all or
substantially all of the assets or business of the Company. None of the rights
of Executive to receive any form of compensation payable pursuant to this
Agreement may be assigned or transferred except by will or the laws of descent
and distribution. Any other attempted assignment, transfer, conveyance or other
disposition of Executive's right to compensation or other benefits will be null
and void.

      12. Notices. All notices, requests, demands and other communications
called for hereunder will be in writing and will be deemed given (i) on the date
of delivery if delivered personally, (ii) one (1) day after being sent by a well
established commercial overnight service, or (iii) four (4) days after being
mailed by registered or certified mail, return receipt requested,

                                       5.
<PAGE>

                                [XENOPORT LOGO]

prepaid and addressed to the parties or their successors at the following
addresses, or at such other addresses as the parties may later designate in
writing:

      If to the Company:

           XenoPort, Inc.
           3410 Central Expressway
           Santa Clara, CA 95051
           Attn: Chief Executive Officer

      If to Executive:

           at the last residential address known by the Company.

      13. Severability. In the event that any provision hereof becomes or is
declared by a court of competent jurisdiction to be illegal, unenforceable or
void, this Agreement will continue in full force and effect without said
provision.

      14. Arbitration.

            (a) General. In consideration of Executive's service to the Company,
its promise to arbitrate all employment related disputes and Executive's receipt
of the compensation, pay raises and other benefits paid to Executive by the
Company, at present and in the future, Executive agrees that any and all
controversies, claims, or disputes with anyone (including the Company and any
employee, officer, director, shareholder or benefit plan of the Company in their
capacity as such or otherwise) arising out of, relating to, or resulting from
Executive's service to the Company under this Agreement or otherwise or the
termination of Executive's service with the Company, including any breach of
this Agreement, will be subject to binding arbitration under the Arbitration
Rules set forth in California Code of Civil Procedure Section 1280 through
1294.2, including Section 1283.05 (the "RULES") and pursuant to California law.
Disputes which Executive agrees to arbitrate, and thereby agrees to waive any
right to a trial by jury, include any statutory claims under state or federal
law, including, but not limited to, claims under Title VII of the Civil Rights
Act of 1964, the Americans with Disabilities Act of 1990, the Age Discrimination
in Employment Act of 1967, the Older Workers Benefit Protection Act, the
California Fair Employment and Housing Act, the California Labor Code, claims of
harassment, discrimination or wrongful termination and any statutory claims.
Executive further understands that this Agreement to arbitrate also applies to
any disputes that the Company may have with Executive.

            (b) Procedure. Executive agrees that any arbitration will be
administered by the American Arbitration Association ("AAA") and that a neutral
arbitrator will be selected in a manner consistent with its National Rules for
the Resolution of Employment Disputes. The arbitration proceedings will allow
for discovery according to the rules set forth in the National Rules for the
Resolution of Employment Disputes or California Code of Civil Procedure.
Executive agrees that the

                                       6.
<PAGE>

                                [XENOPORT LOGO]

arbitrator will have the power to decide any motions brought by any party to the
arbitration, including motions for summary judgment and/or adjudication and
motions to dismiss and demurrers, prior to any arbitration hearing. Executive
agrees that the arbitrator will issue a written decision on the merits.
Executive also agrees that the arbitrator will have the power to award any
remedies, including attorneys' fees and costs, available under applicable law.
Executive understands the Company will pay for any administrative or hearing
fees charged by the arbitrator or AAA except that Executive will pay the first
$125.00 of any filing fees associated with any arbitration Executive initiates.
Executive agrees that the arbitrator will administer and conduct any arbitration
in a manner consistent with the Rules and that to the extent that the AAA's
National Rules for the Resolution of Employment Disputes conflict with the
Rules, the Rules will take precedence.

            (c) Remedy. Except as provided by the Rules, arbitration will be the
sole, exclusive and final remedy for any dispute between Executive and the
Company. Accordingly, except as provided for by the Rules, neither Executive nor
the Company will be permitted to pursue court action regarding claims that are
subject to arbitration. Notwithstanding, the arbitrator will not have the
authority to disregard or refuse to enforce any lawful Company policy, and the
arbitrator will not order or require the Company to adopt a policy not otherwise
required by law which the Company has not adopted.

            (d) Availability of Injunctive Relief. In addition to the right
under the Rules to petition the court for provisional relief, Executive agrees
that any party may also petition the court for injunctive relief where either
party alleges or claims a violation of this Agreement or the Confidentiality
Agreement or any other agreement regarding trade secrets, confidential
information, nonsolicitation or Labor Code ss.2870. In the event either party
seeks injunctive relief, the prevailing party will be entitled to recover
reasonable costs and attorneys' fees.

            (e) Administrative Relief. Executive understands that this Agreement
does not prohibit Executive from pursuing an administrative claim with a local,
state or federal administrative body such as the Department of Fair Employment
and Housing, the Equal Employment Opportunity Commission or the workers'
compensation board. This Agreement does, however, preclude Executive from
pursuing court action regarding any such claim.

            (f) Voluntary Nature of Agreement. Executive acknowledges and agrees
that Executive is executing this Agreement voluntarily and without any duress or
undue influence by the Company or anyone else. Executive further acknowledges
and agrees that Executive has carefully read this Agreement and that Executive
has asked any questions needed for Executive to understand the terms,
consequences and binding effect of this Agreement and fully understand it,
including that Executive is waiving Executive's right to a jury trial. Finally,
Executive agrees that Executive has been provided an opportunity to seek the
advice of an attorney of Executive's choice before signing this Agreement.

      15. Integration. This Agreement, together with the Purchase Agreement, the
Option Plan, the Option Agreements, the Loan, the Additional Purchase Agreement,
the Change of Control Agreement and the Proprietary Information Agreement,
represent the entire agreement and understanding between the parties as to the
subject matter herein and supersedes all prior or contemporaneous agreements
whether written or oral. No waiver, alteration, or modification of any of the
provisions of this Agreement will be binding unless in writing and signed by
duly authorized representatives of the parties hereto.

                                       7.
<PAGE>

                                [XENOPORT LOGO]

      16. Waiver of Breach. The waiver of a breach of any term or provision of
this Agreement, which must be in writing, will not operate as or be construed to
be a waiver of any other previous or subsequent breach of this Agreement.

      17. Headings. All captions and section headings used in this Agreement are
for convenient reference only and do not form a part of this Agreement.

      18. Tax Withholding. All payments made pursuant to this Agreement will be
subject to withholding of applicable taxes.

      19. Governing Law. This Agreement will be governed by the laws of the
State of California (with the exception of its conflict of laws provisions).

      20. Acknowledgment. Executive acknowledges that he has had the opportunity
to discuss this matter with and obtain advice from his private attorney, has had
sufficient time to, and has carefully read and fully understands all the
provisions of this Agreement, and is knowingly and voluntarily entering into
this Agreement.

      21. Counterparts. This Agreement may be executed in counterparts, and each
counterpart will have the same force and effect as an original and will
constitute an effective, binding agreement on the part of each of the
undersigned.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]

                                       8.
<PAGE>

                                [XENOPORT LOGO]

      IN WITNESS WHEREOF, each of the parties has executed this Agreement, in
the case of the Company by their duly authorized officers, as of the day and
year first above written.

COMPANY:

XENOPORT, INC.

By: /s/ Ronald  W. Barrett              Date: September 20, 2004

Title: Chief Executive Officer

EXECUTIVE

/s/ William J. Rieflin                  Date: September 20, 2004
-------------------------------
William J. Rieflin

                [SIGNATURE PAGE TO RIEFLIN EMPLOYMENT AGREEMENT]