<PAGE>

                                                                   Exhibit 10.22

                                   EXHIBIT A-1

                          FULL RECOURSE PROMISSORY NOTE

$125,000.00                                                     January 11, 2002

      For value received, the undersigned promises to pay to XenoPort, Inc., a
Delaware corporation (the "Company"), or order, at its principal office the
principal sum of $125,000.00 with interest thereon at the rate of four and
fourty nine hundredths percent (4.49%) per annum on the unpaid balance of the
principal sum. Said principal and interest shall be due on January 11, 2007.

      Upon any termination of the employment between the undersigned and the
Company, this Note shall be due and payable within ninety (90) days following
the date of such termination, except for a termination described in Section 5(b)
of the Restricted Stock Purchase Agreement between the Company and the
undersigned executed contemporaneously with this Note, in which case payment
shall be due within twelve (12) months following the date of such termination.

      Principal payable in lawful money of the United States of America. THE
PRIVILEGE IS RESERVED TO PREPAY ANY PORTION OF THE NOTE AT ANY TIME.

      Should suit be commenced to collect this Note or any portion thereof, such
sum as the Court may deem reasonable shall be added hereto as attorneys' fees.
The maker waives presentment for payment, protest, notice of protest, and notice
of non-payment of this Note.

      This Note is secured by a pledge of certain shares of Common Stock of the
Company, pursuant to the provisions of the Restricted Stock Purchase Agreement
and the Security Agreement between the Company and the undersigned executed
contemporaneously with this Note.

      The holder of this Note shall have full recourse against the maker, and
shall not be required to proceed against the Shares or other collateral securing
this Note in the event of default.

      The undersigned understands that the holding period under Rule 144 of the
Securities Act of 1933 generally will not begin to run until this Note has been
paid in full.

                                        /s/ William G. Harris
                                        ---------------------------------
                                        Signature

                                        William G. Harris
                                        ---------------------------------
                                        Printed Name

                                       1.
<PAGE>

                                   EXHIBIT A-2

                               SECURITY AGREEMENT

      This Security Agreement is made as of January 11, 2002 between XenoPort,
Inc., a Delaware corporation ("Pledgee"), and William G. Harris ("Pledgor").

                                    Recitals

      Pursuant to Pledgor's Promissory Note dated and given to Pledgee on the
date hereof (the "Note"), Pledgor has borrowed $125,000.00 from Pledgee and
wishes to secure repayment of the Note with shares of Pledgee's Common Stock
(the "Shares").

      NOW, THEREFORE, it is agreed as follows:

      1. Creation and Description of Security Interest. In consideration of the
loan of $125,000.00 to Pledgor under the Note, Pledgor, pursuant to the
California Commercial Code; hereby pledges 500,000 Shares (herein sometimes
referred to as the "Collateral") represented by certificate number 118, duly
endorsed in blank or with executed stock powers, and herewith delivers said
certificate to the Secretary or Assistant Secretary of Pledgee ("Pledgeholder"),
who shall hold said certificate subject to the terms and conditions of this
Security Agreement.

      The pledged Shares (together with an executed blank Assignment Separate
from Certificate for use in transferring all or a portion of the Shares to
Pledgee if, as and when required pursuant to this Security Agreement) shall be
held by the Pledgeholder as security for the repayment of the Note, and any
extensions or renewals thereof, executed by Pledgor, and the Pledgeholder shall
not encumber or dispose of such Shares except in accordance with the provisions
of this Security Agreement.

      2. Pledgor's Representations and Covenants. To induce Pledgee to enter
into this Security Agreement, Pledgor represents and covenants to Pledgee, its
successors and assigns, as follows:

            a. Payment of Indebtedness. Pledgor will pay the principal sum of
the Note secured hereby, together with interest thereon, at the time and in the
manner provided in the Note.

            b. Encumbrances. The Shares are free of all other encumbrances,
defenses and liens, and Pledgor will not further encumber the Shares without the
prior written consent of Pledgee.

            c. Margin Regulations. In the event that Pledgee's Common Stock is
now or later becomes margin listed by the Federal Reserve Board and Pledgee is
classified as a "lender" within the meaning of the regulations under Part 207 of
Title 12 of the Code of Federal Regulations ("Regulation G"), Pledgor agrees to
cooperate with Pledgee in making any

                                       1.
<PAGE>

amendments to the Note or providing any additional collateral as may be
necessary to comply with such regulations.

      3. Voting Rights. During the term of this pledge and so long as all
payments of principal and interest are made as they become due under the terms
of the Note, Pledgor shall have the right to vote all of the Shares pledged
hereunder.

      4. Stock Adjustments. In the event that, during the term of the pledge,
any stock dividend, reclassification, readjustment or other changes are declared
or made in the capital structure of Pledgee, all new, substituted and additional
shares or other securities issued by reason of any such change, as they relate
to the Shares, shall be delivered to and held by the Pledgeholder under the
terms of this Security Agreement in the same manner as the Shares originally
pledged hereunder. In the event of substitution of such securities, Pledgor,
Pledgee and Pledgeholder shall cooperate and execute such documents as are
reasonable so as to provide for the substitution of such Collateral and, upon
such substitution, references to "Shares" in this Security Agreement shall
include the substituted shares of capital stock of Pledgor as a result thereof.

      5. Options and Rights. In the event that, during the term of this pledge,
subscription options or other rights or options shall be issued in connection
with the pledged Shares, such subscription options or other rights or options
shall be the property of Pledgor and, if exercised by Pledgor, all new stock or
other securities so acquired by Pledgor, as they relate to the pledged Shares
then held by Pledgeholder, shall be immediately delivered to Pledgeholder, to be
held under the terms of this Security Agreement in the same manner as the Shares
pledged.

      6. Default. Pledgor shall be deemed to be in default of the Note and of
this Security Agreement in the event:

            a. Payment of principal or interest on the Note shall be delinquent
for a period of 10 days or more; or

            b. Pledgor fails to perform any of the covenants contained in this
Security Agreement for a period of 14 days after written notice thereof from
Pledgee.

      In the case of an event of Default, as set forth above, Pledgee shall have
the right to accelerate payment of the Note upon notice to Pledgor, and Pledgee
shall thereafter be entitled to pursue its remedies under the California
Commercial Code, including the right to sell the pledged Shares at a private or
public sale, or to repurchase the pledged Shares. The parties agree that the
repurchasing of the pledged Shares by the Company, or by any person to whom the
Company may have assigned its rights hereunder, is commercially reasonable if
made at the Fair Market Value (as defined below) of the pledged Shares.

      7. Fair Market Value. "Fair Market Value" means, as of any date, the value
of Common Stock determined as follows:

            a. If the pledged Shares are listed on any established stock
exchange or a national market system, including without limitation the Nasdaq
National Market or The Nasdaq SmallCap Market of The Nasdaq Stock Market, their
Fair Market Value shall be the closing sales

                                       2.
<PAGE>

price for such securities (or the closing bid, if no sales were reported) as
quoted on such exchange or system for the last market trading day prior to the
time of determination, as reported in The Wall Street Journal;

            b. If the pledged Shares are regularly quoted by a recognized
securities dealer but selling prices are not reported, the Fair Market Value of
a such securities shall be the mean between the high bid and low asked prices
for such securities on the date of determination, as reported in The Wall Street
Journal; or

            c. In the absence of an established market for the pledged Shares,
the Fair Market Value thereof shall be determined in good faith by the Board of
Directors of the Company.

      8. Application of Proceeds. The proceeds of any sale or repurchase of the
Shares shall be applied in the following order:

            a. To pay all reasonable expenses of the Company in enforcing the
Note, including reasonable attorney's fees.

            b. In satisfaction of the remaining indebtedness under the Note.

            c. To the Borrower, any remaining proceeds.

      9. Release of Collateral. Subject to any applicable contrary rules under
Regulation G, there shall be released from this pledge a portion of the pledged
Shares held by Pledgeholder hereunder upon payments and forgivenesses of the
principal of the Note. The number of the pledged Shares which shall be released
shall be that number of full Shares which bears the same proportion to the
initial number of Shares pledged hereunder as the payment or forgiveness of
principal bears to the initial full principal amount of the Note; provided,
however, that no Shares shall be released from this Pledge if the release of
such Shares would cause the Fair Market Value of the Shares held by Pledgeholder
following such release to fall below 125% of the remaining principal amount of
the Note following such release.

      10. Withdrawal or Substitution of Collateral. Pledgor shall not sell,
withdraw, pledge, substitute or otherwise dispose of all or any part of the
Collateral without the prior written consent of Pledgee.

      11. Term. The within pledge of Shares shall continue until the payment or
forgiveness of all indebtedness secured hereby, at which time the remaining
pledged stock shall be promptly delivered to Pledgor, subject to the provisions
for prior release of a portion of the Collateral as provided in paragraph 9
above.

      12. Insolvency. Pledgor agrees that if a bankruptcy or insolvency
proceeding is instituted by or against it, or if a receiver is appointed for the
property of Pledgor, or if Pledgor makes an assignment for the benefit of
creditors, the entire amount unpaid on the Note shall become immediately due and
payable, and Pledgee may proceed as provided in the case of default.

                                       3.
<PAGE>

      13. Pledgeholder Liability. In the absence of willful or gross negligence,
Pledgeholder shall not be liable to any party for any of his acts, or omissions
to act, as Pledgeholder.

      14. Invalidity of Particular Provisions. Pledgor and Pledgee agree that
the enforceability or invalidity of any provision or provisions of this Security
Agreement shall not render any other provision or provisions herein contained
unenforceable or invalid.

      15. Successors or Assigns. Pledgor and Pledgee agree that all of the terms
of this Security Agreement shall be binding on their respective successors and
assigns, and that the term "Pledgor" and the term "Pledgee" as used herein shall
be deemed to include, for all purposes, the respective designees, successors,
assigns, heirs, executors and administrators.

      16. Governing Law. This Security Agreement shall be interpreted and
governed under the laws of the State of California.

      IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of
the day and year first above written.

      "PLEDGOR"                     /s/ William G. Harris
                                    --------------------------------------------
                                    Signature

                                    William G. Harris
                                    --------------------------------------------
                                    Printed Name

                                    Address:
                                                 ---------------------------
                                                 ---------------------------

      "PLEDGEE"                     XENOPORT, INC.
                                    a Delaware corporation

                                    By: /s/ Ronald W. Barrett

                                    Title: President/CEO

      "PLEDGEHOLDER"                /s/ Alexander Phillips
                                    --------------------------------------------
                                    Signature

                                    Alexander Phillips - Assistant Secretary
                                    --------------------------------------------

                                    Printed Name

                                       4.