<PAGE>   1
                                                                    EXHIBIT 10.3



                  AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT

        THIS AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT (the "Agreement") is
made as of April 7, 2000, by and among Discovery Partners International, Inc.
(formerly known as IRORI), a California corporation (the "Company"), the holders
of shares of the Company's Common Stock listed on Exhibit A (each of which is
herein referred to as a "Shareholder", which term includes his or her heirs,
executors, guardians, successors and assigns) and the investors listed on
Exhibit C hereto, each of which is herein referred to as an "Investor."

        WHEREAS, the Company and certain of the Investors are parties to the
Series E Preferred Stock Purchase Agreement of even date herewith (the "Stock
Purchase Agreement").

        WHEREAS, each of the Shareholders is the beneficial owner of the number
of shares of the Company's Common Stock listed on Exhibit A attached hereto (the
"Stock," which term for purposes of this Agreement also includes any additional
shares of Common Stock of the Company now owned or hereafter acquired by any
Shareholder).

        WHEREAS, certain of the Investors are presently holders of the Company's
Series A Preferred Stock, Series B Preferred Stock, Series C Preferred Stock and
Series D Preferred Stock and in connection with the purchases of such shares
have entered into a Shareholders' Agreement dated as of October 19, 1995, as
amended October 19, 1995, October 31, 1997, June 1, 1998 and June 15, 1998
(together, the "Original Agreement").

        WHEREAS, in order to induce the Company to enter into the Stock Purchase
Agreement and to induce certain Investors to invest funds in the Company
pursuant to the Stock Purchase Agreement, the Shareholders, all of the Investors
and the Company wish to amend and restate the Original Agreement so that this
Agreement will govern the rights of the parties with respect to the matters set
forth herein.

        NOW, THEREFORE, in consideration of the mutual covenants contained
herein and other good and valuable consideration, the receipt and sufficiency of
which are hereby acknowledged, the parties to this Agreement hereby agree as
follows:

        1. Restrictions on Transfer. Except as permitted by the terms of this
Agreement, a Shareholder may not make any sale, exchange, transfer, assignment,
gift, pledge, encumbrance, hypothecation or alienation of any shares of the
Stock, or any interest in such shares, now held by or hereafter acquired by such
Shareholder, whether voluntarily or involuntarily or by operation of law
(hereinafter collectively referred to as a "transfer").

        2. Intentionally Omitted.

        3. Intentionally Omitted.

        4. Right of First Refusal.

               (a) Notice to the Company and Investor.

<PAGE>   2

                      (i) In the event any Shareholder (the "Transferring
Shareholder") desires to transfer any Stock other than as specifically provided
in Section 6 below, such Shareholder must deliver a notice in writing by
certified mail ("Notice") to the Company stating (A) his bona fide intention to
sell or transfer such shares, (B) the number of such shares to be sold or
transferred, (C) the price, if any, for which he proposes to sell or transfer
such shares, and (D) the name of the proposed purchaser or transferee.

                      (ii) In the event the proposed transfer is partially or
completely in exchange for assets other than cash, then such assets shall be
deemed to have a cash value in the amount determined by the Company's Board of
Directors in its sole good faith opinion, in which case such cash value
ascertained by the Board, when added to any cash to be exchanged and then
divided by the number of shares of Stock to be transferred, shall be deemed the
price per share set forth in the Notice. In the event of a gift, property
settlement or other transfer in which the proposed purchaser or transferee is
not paying the full price for the Stock, which transfer is not otherwise
exempted from the terms of Section 4 and 5 hereof, the price shall be deemed to
be the fair market value of the Stock as determined in good faith by the Board
of Directors.

               (b) Company Right of First Refusal. The Company shall have an
exclusive, irrevocable option (the "Company Option"), at any time within thirty
(30) days of receipt of the Notice, to purchase some or all of the Stock to
which the Notice refers at the price per share specified in the Notice. The
Company shall exercise the Company Option by written notice signed by an officer
of the Company and delivered or mailed to the Transferring Shareholder (the
"Company Settlement Notice"), which notice shall specify the time, place and
date for settlement of such purchase.

               (c) Company Settlement. Within ten (10) days of receipt of the
Company Settlement Notice, the Transferring Shareholder must deliver to the
Company all certificates for the Stock being acquired by the Company which are
not already in the Company's custody, together with proper assignments in blank
of the Stock with signatures properly guaranteed and with such other documents
as may be required by the Company to provide reasonable assurance that each
necessary endorsement is genuine and effective, and the Company must thereupon
deliver to the Transferring Shareholder full cash payment for the Stock being
acquired, provided that if the terms of payment set forth in the Notice were
other than cash against delivery, the Company shall pay for said shares on the
same terms and conditions set forth in such Notice.

               (d) Investor Right of First Refusal. In the event that the
Company does not exercise the Company Option as to all the shares to be sold or
transferred in accordance with Section 4 hereof, the Company shall not later
than thirty (30) days from the date of receipt of the Notice hereof give written
notice to the Investors of the Company's nonexercise (or partial exercise) of
the Company Option, which notice shall enclose the Notice and the details of the
Company's partial exercises (if any), and shall specify the procedures by which
each Investor may exercise the option to purchase not more than its Pro Rata
Share (as defined in Section 4(g) below) of the remaining shares of Stock (the
"Investor Option"). For thirty (30) calendar days following the expiration of
the Company Option, each Investor may exercise its Investor Option at the same
price and upon the same terms as set forth in the Notice. Any Investor



                                      -2-
<PAGE>   3

desiring to exercise its Investor Option shall deliver to the Company and to the
Transferring Shareholder a written notice of election to purchase the shares
with respect to which the Investor option is to be exercised. The Company shall,
within three (3) days after the end of such thirty (30) day period, inform each
Investor purchasing all of the shares available to it (a "Fully-Exercising
Investor") of any other Investor's failure to do likewise. During the ten (10)
day period commencing after receipt of such information, each Fully-Exercising
Investor shall be entitled to give written notice to the Company and the
Transferring Shareholder of its election (the "Investor Over-Allotment Option")
to purchase that portion of the shares for which Investors were entitled to
subscribe but which were not subscribed for by the Investors equal to the
proportion that the Pro Rata Share of such Fully-Exercising Investor bears to
the Pro Rata Shares of all of the Fully-Exercising Investors who wish to
purchase some of the unsubscribed shares, or such other proportions as the
Investors shall determine.

               (e) Assignment of Investor Option. Each Investor may assign its
rights under this Section 4 to (i) any of its limited partners or shareholders,
(ii) any entity related to or affiliated with such Investor, or (iii) another
Investor; provided, however, that if payment is to be made in any manner other
than all cash against delivery of the Stock being sold, such assignee must be at
least as creditworthy as the Investor so assigning its rights.

               (f) Investor Settlement. Promptly upon expiration of the Investor
Option and the Investor Over-Allotment Option, the Company shall deliver a
notice in writing to the Transferring Shareholder and each Investor and/or
assignee who elected to acquire a portion of the Stock subject to the Investor
Option (the "Investor Settlement Notice") setting forth the number of shares of
Stock to be sold to each Investor and/or assignee and the price thereof. Within
ten (10) days of receipt of the Investor Settlement Notice, the Transferring
Shareholder must deliver to the Company any certificates for the Stock being
acquired by the Investors and/or assignees which are not already in the
Company's custody, together with proper assignments in blank of the Stock with
signatures properly guaranteed and with such other documents as may be required
by the Company to provide reasonable assurance that each necessary endorsement
is genuine and effective. Within ten (10) days of receipt of the Investor
Settlement Notice, each Investor and/or assignee acquiring a portion of the
Stock must deliver to the Company (a) full cash payment for the portion of the
subject Stock being so acquired, provided that if the terms of payment set forth
in the Notice were other than cash against delivery, the Investors electing to
acquire a portion of the subject Stock and/or their assignees shall pay for said
shares on the same terms and conditions set forth in such Notice; and, if
applicable, (b) evidence satisfactory to the Company that such assignee has
become a party to this Agreement. The Company shall thereafter promptly remit
full payment for the Stock acquired hereby to the Transferring Shareholder and
deliver the new or assigned certificates to the Investors and/or assignees, as
appropriate.

               (g) Determination of Pro Rata Share. For purposes of this Section
4, each Investor's "Pro Rata Share" is the ratio of (i) the total number of
shares of Common Stock and Preferred Stock of the Company held by such Investor
as of the date of the Notice (on an as-converted to Common Stock basis) to (ii)
the total aggregate shares of Common Stock and Preferred Stock of the Company
held by all Investors as of such date (on an as-converted to Common Stock basis)
that have elected to exercise the Investor Option that is exercisable at the
time such "Pro Rata Share" is determined.



                                      -3-
<PAGE>   4

        5. Co-Sale Rights in Sales by a Shareholder.

               (a) Co-Sale Notice. In the event that less than all of the shares
of Stock proposed to be transferred by a Transferring Shareholder are acquired
by the Company and/or Investors (or assignees) pursuant to the Company Option
and Investor Option set forth in Section 4 above (collectively, the "Options"),
the Company shall deliver, promptly upon expiration of the Options, a notice in
writing to each Investor (the "Co-Sale Notice") reiterating the names of the
prospective Transferee or Transferees, the number of shares of Stock proposed to
be transferred and not acquired pursuant to the Options, and the price per share
at which such shares are proposed to be transferred.

               (b) Grant of Co-Sale Rights. Each Investor shall have the right,
exercisable upon written notice to such Transferring Shareholder within fifteen
(15) business days after receipt of the Transferring Shareholder's Co-Sale
Notice, to participate in the sale of the shares on the same terms and
conditions as those set forth in the Co-Sale Notice. To the extent one or more
of the Investors exercise such right of participation, the number of shares that
the Transferring Shareholder may sell in the transaction shall be
correspondingly reduced. The right of participation of each of the Investors
shall be subject to the terms and conditions set forth in this Section:

                      (i) Each Investor shall be deemed to own the number of
shares of Common Stock which such Investor actually holds plus the number of
shares of Common Stock which are issuable upon conversion of any shares of
Preferred Stock then held by such Investor.

                      (ii) Each Investor may sell all or any part of a number of
shares of Stock of the Company equal to the product obtained by multiplying (A)
the aggregate number of shares of Common Stock covered by the Co-Sale Notice by
(B) a fraction the numerator of which is the number of shares of Common Stock
and Preferred Stock of the Company at the time owned by the Investor and the
denominator of which is the combined number of shares of Common Stock and
Preferred Stock of the Company at the time owned by the Transferring Shareholder
and Investors.

                      (iii) To the extent an Investor elects not to sell the
full number of shares it is entitled to sell pursuant to Section 5(b)(ii) above,
the other Investors' rights to participate in the sale shall be increased pro
rata by a corresponding number of shares.

                      (iv) Each Investor may effect its participation in the
sale by delivering to the Transferring Shareholder for transfer to the purchase
offeror one or more certificates, properly endorsed for transfer, which
represent:

                             A. the number of shares of Common Stock which the
party elects to sell pursuant to this Section 5(b); or

                             B. that number of shares of Preferred Stock which
is at such time convertible into the number of shares of Common Stock which the
party has elected to sell pursuant to this Section 5(b); provided, however, that
if the purchase offeror



                                      -4-
<PAGE>   5

objects to the delivery of Preferred Stock in lieu of Common Stock, the party
may convert and deliver Common Stock as provided in Section 5(b)(i) above.

               (c) Payment of Proceeds. The stock certificates which the
Investors deliver to such Transferring Shareholder pursuant to Section 5(b)
shall be transferred by the Transferring Shareholder to the purchase offeror in
consummation of the sale of the Stock pursuant to the terms and conditions
specified in the Co-Sale Notice, and such Transferring Shareholder shall
promptly thereafter remit to each Investor that portion of the sale proceeds to
which the Investor is entitled by reason of its participation in such sale. To
the extent that the purchase offeror refuses to purchase shares from an Investor
exercising its right of co-sale hereunder, the Transferring Shareholder shall
not sell to such purchase offeror unless or until, simultaneous with such sale,
the Transferring Shareholder shall purchase shares from Investor.

               (d) Non-exercise. The exercise or non-exercise of the rights of
the Investors hereunder to participate in one or more sales of Stock made by the
Shareholders shall not adversely affect their rights to participate in
subsequent Stock sales by the Shareholders.

               (e) Transfer of Common Shares Upon Failure to Exercise Right of
Co-Sale. If none of the Investors elects to participate in the sale of the Stock
subject to the Co-Sale Notice, the Transferring Shareholder may, not later than
sixty (60) days following the Investors' receipt of the Co-Sale Notice, conclude
a transfer of not less than all of the Stock covered by the Co-Sale Notice on
terms and conditions not more favorable to the transferor than those described
in the Co-Sale Notice. Any proposed transfer on terms and conditions not more
favorable to the transferor than those described in the Co-Sale Notice, as well
as any subsequent proposed transfer of any Stock by the Transferring
Shareholder, shall again be subject to, and require compliance with, the
provisions of Sections 4 and 5 hereof.

        6.     Exempt Transfers.

               (a) Permitted Transactions. Notwithstanding the foregoing, the
co-sale rights and rights of first refusal of the Investors shall not apply to
any transfer by gift to the ancestors, descendants, siblings or spouse of a
Shareholder or to trusts for the benefit of such persons or to any or all of the
partners of a Shareholder that is a general or limited partnership; provided
that the transferee shall furnish the Company and the Investors with a written
agreement to be bound by and comply with all provisions of this Agreement. Such
transferred Stock shall remain "Stock" hereunder, and such transferee shall be
treated as a "Shareholder" for the purposes of this Agreement.

               (b) Company Repurchase. The provisions of Sections 4 and 5 of
this Agreement shall not apply to the sale of any Stock to the Company.

        7. Stop Transfer Instrument. Any attempt by a Shareholder to transfer
Stock in violation of Sections 4 or 5 hereof, whether voluntary or involuntary,
shall be void and the Company agrees it will not effect such a transfer nor will
it treat any alleged transferee as the Shareholder of such shares without the
written consent of the holders of a majority of the shares held by the
Investors.

        8. Special Provisions.



                                      -5-
<PAGE>   6

               (a) Shareholder Rights. Until such time as the Company actually
exercises the Company Option and/or the Investors actually exercise the Investor
Option or the Investor Over-Allotment Option under this Agreement, each
Shareholder (or any successors in interest) shall have all the rights of a
shareholder (including voting and dividend rights) with respect to the Stock
subject, however, to the transfer restrictions of Section 1.

               (b) Intentionally Omitted.

               (c) Market Stand-off Agreement. Each Shareholder hereby agrees
that, during the period of duration specified by the Company and an underwriter
of common stock or other securities of the Company, following the effective date
of an initial registration statement of the Company filed under the Act, it
shall not, to the extent requested by the Company and such underwriter, directly
or indirectly sell, offer to sell, contract to sell (including, without
limitation, any short sale), grant any option to purchase or otherwise transfer
or dispose of (other than to donees who agree to be similarly bound) any
securities of the Company held by it at any time during such period except
common stock included in such registration; provided, however, that:

                      (i) such agreement shall not exceed 180 days for the first
such registration statement of the Company which covers common stock (or other
securities) to be sold on its behalf to the public in an underwritten offering;
and

                      (ii) such agreement shall not exceed 90 days for any
subsequent registration statement of the Company which covers common stock (or
other securities) to be sold on its behalf to the public in an underwritten
offering.

                      In order to enforce the foregoing covenant, the Company
may impose stop-transfer instructions with respect to the Stock of each
Shareholder (and the shares or securities of every other person subject to the
foregoing restriction) until the end of such period.

               (d) Future Investors. Upon the purchase by any Investor of
Preferred Stock under a stock purchase agreement, the Company, the Shareholders
and the Investors agree to amend this Agreement to make such Investor a party to
this Agreement (with respect to such shares of Preferred Stock purchased by such
Investor) with rights and obligations equal to and consistent with those of the
Investors under this Agreement, to the extent that such Investor is not already
entitled to such rights.

        9. Termination. The right of first refusal and the co-sale rights of an
Investor under Sections 4 and 5 of this Agreement and the correlative
obligations of each Shareholder to such Investor with respect to its Stock shall
terminate at such time as such Investor shall no longer be the owner of any
shares of capital stock of the Company. Unless sooner terminated in accordance
with the preceding sentence, the rights and obligations under Sections 4 and 5
of this Agreement shall terminate upon the occurrence of any one of the
following events (each, a "Corporate Transaction"):

               (a) the liquidation, dissolution or indefinite cessation of the
business operations of the Company;



                                      -6-
<PAGE>   7

               (b) the execution by the Company of a general assignment for the
benefit of creditors or the appointment of a receiver or trustee to take
possession of the property and assets of the Company;

               (c) immediately prior to the closing of a bona fide firm
commitment underwritten public offering of the Company's Common Stock registered
under the Securities Act of 1933 on Form S-1 (or any successor form designated
by the Securities and Exchange Commission).

        10. Miscellaneous Provisions.

               (a) Notice. Any notice required or permitted to be given to a
party pursuant to the provisions of this Agreement shall be in writing and shall
be effective upon personal delivery or upon deposit in the U.S. mail (or
equivalent independent service), postage prepaid and properly addressed to the
party to be notified as set forth below such party's signature or at such other
address as such party may designate by ten (10) days' advance written notice to
the other parties hereto.

               (b) Severability. In the event one or more of the provisions of
this Agreement should, for any reason, be held to be invalid, illegal or
unenforceable in any respect, such invalidity, illegality or unenforceability
shall not affect any other provisions of this Agreement, and this Agreement
shall be construed and interpreted in such manner as to be effective and valid
under applicable law.

               (c) Waiver or Modification. Any waiver, amendment or modification
of this Agreement shall be effective only if evidenced by a written instrument
executed by (i) Shareholders holding a majority of the Stock subject to this
Agreement, (ii) the Company and (iii) Investors, or their assignees, holding not
less than a majority of the Common Stock issued or issuable upon conversion of
the Preferred Stock then held by the Investors (and, in the case of any waiver,
amendment or modification which discriminates particularly against the Series D
Preferred Stock, holding not less than a majority of the Series D Preferred
Stock then held by the Investors). Notwithstanding the foregoing, additional
holders of Common Stock of the Company may be made a party to this Agreement by
signing a counterpart signature page to this Agreement and shall thereafter be
included within the definition of "Shareholders."

               (d) Governing Law. This Agreement shall be governed by and
construed in accordance with the laws of the State of California as applied in
contracts among California residents entered into and performed entirely within
California.

               (e) Attorneys' Fees. In the event of any dispute involving the
terms hereof, the prevailing parties shall be entitled to collect legal fees and
expenses from the other party to the dispute.

               (f) Further Assurances. Each party agrees to act in accordance
herewith and not to take any action which is designed to avoid the intention
hereof.



                                      -7-
<PAGE>   8

               (g) Ownership. Each Shareholder represents and warrants that he
or she is the sole legal and beneficial owner of the shares of Common Stock
subject to this Agreement and that no other person has any interest (other than
a community property interest) in such shares.

               (h) Successors and Assigns. This Agreement and the rights and
obligations of the parties hereunder shall inure to the benefit of, and be
binding upon, their respective successors, assigns and legal representatives.

               (i) Aggregation of Stock. For the purposes of determining the
availability of any rights under this Agreement, the holdings of transferees and
assignees of an individual or a partnership who are spouses, ancestors, lineal
descendants or siblings of such individual or partners or retired partners of
such partnership (including spouses and ancestors, lineal descendants and
siblings of such partners or spouses who acquire Common Stock by gift, will or
intestate succession) shall be aggregated together with the individual or
partnership, as the case may be, for the purpose of exercising any rights or
taking any action under this Agreement.

               (j) Counterparts. This Agreement may be executed in two or more
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

               (k) Separate Counsel. Each Shareholder acknowledges and agrees
that such Shareholders have been provided the opportunity and encouraged to
consult with counsel of such Shareholders' own choosing with respect to this
Agreement and that Brobeck, Phleger & Harrison solely represents the interests
of the Company.

               (l) Legend. Each certificate representing shares of Stock now or
hereafter owned by each Shareholder shall be endorsed with the following legend:

               THE SALE OR TRANSFER OF THE SECURITIES REPRESENTED BY THIS
               CERTIFICATE IS SUBJECT TO THE TERMS AND CONDITIONS OF A CERTAIN
               AGREEMENT AMONG THE SHAREHOLDER, THE CORPORATION AND CERTAIN
               HOLDERS OF STOCK OF THE CORPORATION. COPIES OF SUCH AGREEMENT MAY
               BE OBTAINED UPON WRITTEN REQUEST TO THE SECRETARY OF THE
               CORPORATION.



                                      -8-
<PAGE>   9

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


                                        Discovery Partners International, Inc.,
                                        a California corporation (formerly known
                                        as IRORI)


                                        By:  /s/ Richardo Pigliucci
                                             -----------------------------------
                                             Riccardo Pigliucci, Chief Executive
                                             Officer


                              Address:  9640 Towne Center Drive
                                        San Diego, CA  92121


                                        SHAREHOLDERS:


                                        ----------------------------------------
                                        Dr. Michael Nova


                              Address:  Scripps Research Institute BCC405
                                        10550 North Torrey Pines Road
                                        La Jolla, CA  92037


                                        ----------------------------------------
                                        K.C. Nicolau


                              Address:  Scripps Research Institute BCC405
                                        10550 North Torrey Pines Road
                                        La Jolla, CA  920


                                        ENTERPRISE PARTNERS III, L.P.


                                        By: Enterprise Management Partners III,
                                            L.P.,
                                            Its General Partner


                                            By: /s/ Andrew E. Senyei
                                                --------------------------------
                                                General Partner Andrew E. Senyei

                                        Address:  7979 Ivanhoe Avenue, Suite 550
                                        La Jolla, CA  92037



                   [SIGNATURE PAGE TO SHAREHOLDERS' AGREEMENT]
<PAGE>   10

                               INVESTORS:

                               ENTERPRISE PARTNERS III, L.P.


                               By:  Enterprise Management Partners III, L.P.,
                                    Its General Partner


                                    By:  /s/ Andrew E. Senyei
                                        ----------------------------------------
                                         General Partner Andrew E. Senyei


                               Address:  7979 Ivanhoe Avenue, Suite 550
                               La Jolla, CA  92037


                               ENTERPRISE PARTNERS III ASSOCIATES, L.P.


                               By:  Enterprise Management Partners III, L.P.,
                                    Its General Partner


                                    By:  /s/ Andrew E. Senyei
                                        ----------------------------------------
                                         General Partner Andrew E. Senyei


                               Address:  7979 Ivanhoe Avenue, Suite 550
                               La Jolla, CA  92037



                   [SIGNATURE PAGE TO SHAREHOLDERS' AGREEMENT]
<PAGE>   11

                                MAYFIELD VIII, a California Limited Partnership


                                By:      Mayfield VIII Management, L.L.C. a
                                         Delaware limited liability company, its
                                         General Partner


                                         By:  /s/ A. Grant Heidrich
                                              ----------------------------------
                                                 General Partner


                                Address:  2800 Sand Hill Road
                                Menlo Park, CA  94025


                                MAYFIELD ASSOCIATES FUND II, a California
                                Limited Partnership


                                By:        /s/ A. Grant Heidrich
                                          --------------------------------------
                                          General Partner


                                Address:  2800 Sand Hill Road
                                Menlo Park, CA  94025


                                CROSSPOINT VENTURE PARTNERS-1996


                                By:  /s/ Don Milder
                                     -------------------------------------------
                                       Don Milder, General Partner


                                Address:  18552 MacArthur Boulevard, Suite 400
                                Irvine, CA  92715


                                CROSSPOINT VENTURE PARTNERS LS-1997


                                By:  /s/ Don Milder
                                     -------------------------------------------
                                       Don Milder, General Partner


                                Address:  18552 MacArthur Boulevard, Suite 400
                                Irvine, CA  92715



                   [SIGNATURE PAGE TO SHAREHOLDERS' AGREEMENT]
<PAGE>   12

                                AGILENT TECHNOLOGIES, INC., f/k/a
                                Hewlett-Packard Company


                                By:
                                   ---------------------------------------------


                                Its:
                                    --------------------------------------------


                                Address:  Mail Stop 20 BQ
                                3000 Hanover Street
                                Palo Alto, CA  94304
                                Attn:  Craig Norlin, Legal Counsel


                                BRISTOL-MYERS SQUIBB COMPANY

                                By:
                                   ---------------------------------------------

                                Address:  P.O. Box 4000
                                Route 206 & Province Line Road
                                Princeton, NJ 08543-4000
                                Attn:  Vice President and Senior Counsel,
                                       Pharmaceutical Research Institute and
                                       Worldwide Strategic Business
                                       Development



                                AVENTIS, f/k/a Rhone-Poulenc Rorer
                                International Holdings, Inc.


                                By:
                                   ---------------------------------------------

                                Address:  3 Park Avenue
                                New York, New York  10016
                                Attn:  Norma Hunt-Allen, Investor Relations


                                PACIFIC VENTURE GROUP II, L.P.
                                By  PVG Equity Partners II LLC
                                    its General Partner


                                By:  /s/ Ralph C. Sabin, Managing Director
                                   ---------------------------------------------


                                Address:  15635 Alton Parkway
                                Suite 230 Irvine, CA  92618



                   [SIGNATURE PAGE TO SHAREHOLDERS' AGREEMENT]
<PAGE>   13

                                BAYSTAR CAPITAL, LLP, a Delaware Limited
                                Partnership

                                By:    BayStar Capital Management, LLC,
                                       Its General Partner

                                By:    /s/ Steve Lamar
                                   ---------------------------------------------
                                           Steve Lamar, Vice President



                                BAYSTAR INTERNATIONAL LTD, a British Virgin
                                Islands Corporation

                                By:    BayStar International Management, LLC,
                                       Its General Partner

                                By:   /s/ Steve Lamar
                                   ---------------------------------------------
                                           Steve Lamar, Vice President


                                          /s/ Hayden Trubitt
                                ------------------------------------------------
                                           Hayden J. Trubitt



                   [SIGNATURE PAGE TO SHAREHOLDERS' AGREEMENT]
<PAGE>   14

                                      PVG ASSOCIATES II, L.P.


                                      By:
                                         ---------------------------------------

                                      Its:
                                          --------------------------------------

                                      Address:  15635 Alton Parkway
                                      Suite 230 Irvine, CA  92618



                                      A-1
<PAGE>   15

                                    EXHIBIT A

                                  Shareholders


<TABLE>
<CAPTION>
                                           Number of Common
Shareholder Name                             Shares Owned
----------------                           ----------------
<S>                                        <C>
Dr. Michael Nova                                300,000
K. C. Nicolaou                                  300,000
Enterprise Partners III, L.P.                   119,600
Enterprise Partners III, Associates              10,400
                                                -------


        TOTAL:                                  730,000
</TABLE>



                                      A-1
<PAGE>   16

                                    EXHIBIT B

                             Intentionally Omitted.



                                      B-1
<PAGE>   17

                                    EXHIBIT C

                                    Investors


Series A Investors

Enterprise Partners III, L.P.
Enterprise Partners III Associates, L.P.
Mayfield VIII
Mayfield Associates Fund II

Series B Investors

Enterprise Partners III, L.P.
Enterprise Partners III Associates, L.P.
Mayfield VIII
Mayfield Associates Fund II
Crosspoint Venture Partners-1996

Series C Investors

Agilent Technologies, Inc. (f/k/a/ Hewlett-Packard Company)

Series D Investors

Bristol-Myers Squibb Company
Crosspoint Venture Partners-1997
Aventis (f/k/a/ Rhone-Poulenc Rorer, Inc.)
Enterprise Partners III, L.P.
Enterprise Partners III Associates, L.P.
Mayfield VIII
Mayfield Associates Fund II

Series E Investors

Enterprise Partners III, L.P.
Enterprise Partners III Associates, L.P.
Mayfield VIII
Mayfield Associates Fund II
Crosspoint Venture Partners LS-1997
Pacific Venture Group II, L.P.
PVG Associates II, L.P.
BayStar Capital, L.P.
BayStar International Ltd.
Hayden J. Trubitt



                                      C-1
<PAGE>   18

                                    EXHIBIT D

                             Intentionally Omitted.



                                      D-1
<PAGE>   19

                                    EXHIBIT E

                             Intentionally Omitted.



                                      E-1
<PAGE>   20

                                    EXHIBIT F

                             Intentionally Omitted.



                                      F-1
<PAGE>   21

                               AMENDMENT NO. 1 TO

                  AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT

        This Amendment No. 1 to Amended and Restated Shareholders' Agreement
("Amendment") is made as of April 28, 2000, with reference to the Amended and
Restated Shareholders' Agreement dated as of April 7, 2000 (the "Agreement").
The parties to this Amendment are Discovery Partners International, Inc.
(formerly known as IRORI), a California corporation (the "Company"), the holders
of shares of the Company's Common Stock listed on Exhibit A to the Agreement
(each of which is herein referred to as a "Shareholder," which term includes his
or her heirs, executors, guardians, successors and assigns), the investors which
purchased shares of the Company's Series A Preferred Stock, Series B Preferred
Stock, Series C Preferred Stock, Series D Preferred Stock and Series E Preferred
Stock (the "Existing Investors") and Axys Pharmaceuticals, Inc., a Delaware
corporation ("Axys"). Capitalized terms used herein which are not defined herein
shall have the definition ascribed to them in the Agreement.

                                    RECITALS

        A. The Company, DPII Newco, LLC, a Delaware limited liability company
("Merger Sub"), Axys and Axys Advanced Technologies, Inc., a Delaware
corporation ("AAT") have entered into that certain Agreement and Plan of Merger,
dated as of April 11, 2000 (the "Merger Agreement") pursuant to which Merger Sub
is being merged with and into AAT with the consequence that AAT will become a
wholly-owned subsidiary of the Company.

        B. As consideration for the acquisition of AAT from Axys pursuant to the
Merger Agreement, the Company is, among other things, issuing shares of its
Common Stock to Axys.

        In consideration of the foregoing and the promises and covenants
contained herein and other good and valuable consideration the receipt of which
is hereby acknowledged, the parties hereto agree as follows:

        1. Additional Parties to the Agreement. Axys hereby enters into and
becomes a party to the Agreement.

        2. Amendment to Agreement. All references to "Investors" in the
Agreement shall be deemed to include and make reference to Axys. Also,
notwithstanding anything in the Agreement to the contrary, Axys shall be allowed
to make a bona fide pledge of its Company Common Stock and Axys' rights under
the Agreement may be assigned to any person if both the following conditions
apply: (i) the assignment to such person is part of the enforcement against
Axys' shares of Company Common Stock of a security interest which Axys had, via
a bona fide pledge, granted to a lender, and (ii) the assignee shall have
executed a written agreement, reasonably satisfactory in form and substance to
the Shareholders, the Existing Investors and the Company, pursuant to which such
person becomes a party to the Agreement (as then amended to


<PAGE>   22

date) and agrees to be bound by all the burdens thereof as if such assignee was
an Investor thereunder.



        3. Reincorporation. Without limitation on any other rights of
assignment, the parties acknowledge that if the Company reincorporates in
Delaware the Agreement shall be assigned to the new Delaware corporation and the
rights and obligations of the parties shall persist as if all references in the
Agreement to "the Company" were references to such Delaware corporation.

        4. Effect of Amendment. Except as amended and set forth above, the
Agreement shall continue in full force and effect.

        5. Counterparts. This Amendment may be executed in any number of
counterparts, each which will be deemed an original, and all of which together
shall constitute one and the same instrument.

        6. Severability. If one or more provisions of this Amendment are held to
be unenforceable under applicable law, such provision shall be excluded from
this Amendment and the balance of the Amendment shall be interpreted as if such
provision were so excluded and shall be enforceable in accordance with its
terms.

        7. Entire Agreement. This Amendment, together with the Agreement,
constitutes the full and entire understanding and agreement between the parties
with regard to the subjects hereof and thereof.

        8. Governing Law. This Amendment shall be governed by and construed
under the laws of the State of California as applied to agreements among
California residents entered into and to be performed entirely within
California.

                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]



                                       2
<PAGE>   23

        IN WITNESS WHEREOF, this Amendment is hereby executed as of the date
first written above.


                              DISCOVERY PARTNERS INTERNATIONAL, INC. (formerly
                              known as IRORI), a California corporation

                              By:    /s/ Riccardo Pigliucci
                                 -----------------------------------------------
                                     Riccardo Pigliucci, Chief Executive Officer

                              Address:  9640 Towne Centre Drive
                              San Diego, CA  92121

SHAREHOLDERS:                 --------------------------------------------------
                              Dr. Michael Nova

                              Address:  Scripps Research Institute
                              BCC405
                              10550 North Torrey Pines Road
                              La Jolla, CA  92037

                                     /s/ K. C. Nicolaou
                              --------------------------------------------------
                              K.C. Nicolaou

                              Address:  Scripps Research Institute
                              BCC405
                              10550 North Torrey Pines Road
                              La Jolla, CA  92037

                              ENTERPRISE PARTNERS III, L.P.

                              By:     Enterprise Management Partners III, L.P.,
                                      Its General Partner

                                      By:  /s/ Andrew Senyei
                                      ------------------------------------------
                                          General Partner

                              Address:  7979 Ivanhoe Avenue, Suite 550
                              La Jolla, CA  92037



                      [SIGNATURE PAGE TO AMENDMENT NO. 1 TO
                  AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT]


<PAGE>   24

                              ENTERPRISE PARTNERS III, L.P.
INVESTORS:

                              By:     Enterprise Management Partners III, L.P.,
                                      Its General Partner
                                      By:   /s/ Senyei Senyei
                                         ---------------------------------------
                                          General Partner

                              Address:  7979 Ivanhoe Avenue, Suite 550
                              La Jolla, CA  92037

                              ENTERPRISE PARTNERS III ASSOCIATES, L.P.

                              By:    Enterprise Management Partners III, L.P.,
                                     Its General Partner

                                     By:    /s/ Andrew Senyei
                                        ----------------------------------------
                                            General Partner

                              Address:  7979 Ivanhoe Avenue, Suite 550
                              La Jolla, CA  92037

                              MAYFIELD VIII,
                              a California Limited Partnership

                              By:    Mayfield VIII Management, L.L.C.,
                                     a Delaware limited liability
                                     company, its general partner

                                     By:    /s/ A. Grant Heidrich, III
                                        ----------------------------------------
                                            General Partner

                              Address:  2800 Sand Hill Road
                              Menlo Park, CA  94025


                              MAYFIELD ASSOCIATES FUND II,
                              a California limited partnership

                              By:  /s/ A. Grant Heidrich, III
                                 -----------------------------------------------
                                     General Partner

                              Address:  2800 Sand Hill Road
                              Menlo Park, CA  94025


                      [SIGNATURE PAGE TO AMENDMENT NO. 1 TO
                  AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT]


<PAGE>   25

                              CROSSPOINT VENTURE PARTNERS-1996

                              By:    /s/ Donald B. Milder
                                 -----------------------------------------------
                                     General Partner

                              Address:  18552 MacArthur Boulevard, Suite 400
                              Irvine, CA  92715

                              CROSSPOINT VENTURE PARTNERS LS-1997

                              By:     /s/ Donald B. Milder
                                 -----------------------------------------------
                                     General Partner

                              Address:  18552 MacArthur Boulevard, Suite 400
                              Irvine, CA  92715

                              AGILENT TECHNOLOGIES, INC., f/k/a
                              Hewlett-Packard Company

                              By:
                                 -----------------------------------------------
                              Its:
                                  ----------------------------------------------

                              Address:  Mail Stop 20 BQ
                              3000 Hanover Street
                              Palo Alto, CA  94304
                              Attn:  Craig Norlin, Legal Counsel

                              BRISTOL-MYERS SQUIBB COMPANY

                              By:

                              Address:  P.O. Box 4000
                              Route 206 & Province Line Road
                              Princeton, NJ 08543-4000
                              Attn:  Vice President and Senior Counsel,
                                     Pharmaceutical Research Institute and
                                     Worldwide Strategic Business
                                     Development


                      [SIGNATURE PAGE TO AMENDMENT NO. 1 TO
                  AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT]


<PAGE>   26

                               -------------------------------------------------
                                            HAYDEN J. TRUBITT

                               Address:  Brobeck, Phleger & Harrison, LLP
                               12390 El Camino Real
                               San Diego, CA 92130

                               AXYS PHARMACEUTICALS, INC.

                               By:    /s/ William J. Newell
                                  ----------------------------------------------
                                      William J. Newell, Senior Vice President

                               Address:  180 Kimball Way
                               South San Francisco, CA 94080


                            [SIGNATURE PAGE TO AMENDMENT NO. 1 TO
                        AMENDED AND RESTATED SHAREHOLDERS' AGREEMENT]


<PAGE>   27
                     DISCOVERY PARTNERS INTERNATIONAL, INC.
             AMENDMENT NO. 2 TO AMENDED AND RESTATED SHAREHOLDERS'
                                    AGREEMENT


        This Amendment No. 2 to Amended and Restated Shareholders' Agreement
(the "Amendment") is made as of June 30, 2000 with reference to the Amended and
Restated Shareholders' Agreement dated April 7, 2000 (together with Amendment
No. 1 dated April 28, 2000, the "Shareholders' Agreement") by and among
Discovery Partners International, Inc., a California corporation (the
"Company"), each of the Shareholders listed on Exhibit A to the Shareholders'
Agreement, each of the Investors listed on Exhibit C to the Shareholders'
Agreement, Axys Pharmaceuticals, Inc., a Delaware corporation ("Axys") and PVG
Associates II, L.P. ("PVG Associates"). Capitalized terms not otherwise defined
herein shall have the meanings set forth in the Shareholders' Agreement.

                                    RECITALS

        A. The Company, the Investors, the Shareholders and Axys are currently
parties to the Shareholders' Agreement;

        B. Pacific Venture Group II, L.P. desires to transfer 11,044 shares of
Series E Preferred Stock of the Company to its affiliate PVG Associates;

        C. The Company, the Investors, the Shareholders and Axys desire that PVG
Associates, through this Amendment, enters into and becomes a part of the
Shareholders' Agreement, having all rights and obligations as an Investor
thereunder.

                                    AGREEMENT

        NOW, THEREFORE, in consideration of the mutual covenants set forth
herein, and for other good and valuable consideration the receipt of which is
hereby acknowledged, the parties agree as follows:

        1. Additional Party to the Shareholders' Agreement. Pursuant to Sections
4(e)(ii), 8(d) and 10(c) of the Shareholders' Agreement, Exhibit C to the
Shareholders' Agreement is hereby amended to include PVG Associates as an
Investor and PVG Associates shall be considered to be an Investor for all
purposes under the Shareholders' Agreement.

        2. Effect of Amendment. Except as expressly modified by this Amendment,
the Shareholders' Agreement shall remain unmodified and in full force and effect

        3. Severability. In the event one or more of the provisions of this
Amendment should, for any reason, be held to be invalid, illegal or
unenforceable in any respect, such invalidity, illegality or unenforceability
shall not affect any other provisions of this Amendment, and this Amendment
shall be construed and interpreted in such manner as to be effective and valid
under applicable law.

<PAGE>   28

        4. Counterparts. This Amendment may be executed in two or more
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.



               [REMAINDER OF THIS PAGE INTENTIONALLY LEFT BLANK]



                                       2
<PAGE>   29

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

                                Discovery Partners International, Inc., a
                                California corporation (formerly known as IRORI)


                                By:/s/ Riccardo Pigliucci
                                   ---------------------------------------------
                                   Riccardo Pigliucci, Chief Executive Officer


                                SHAREHOLDERS:


                                ------------------------------------------------
                                Dr. Michael Nova


                                ------------------------------------------------
                                K.C. Nicolaou


                                ENTERPRISE PARTNERS III, L.P.

                                By:   Enterprise Management Partners III, L.P.,
                                      Its General Partner

                                      By:    /s/ Andrew Senyei
                                             -----------------------------------
                                             General Partner, Andrew E. Senyei,
                                              M.D.

                                INVESTORS:


                                ENTERPRISE PARTNERS III, L.P.


                                By:     Enterprise Management Partners III,
                                        L.P., Its General Partner

                                        By: /s/ Andrew Senyei
                                            ------------------------------------
                                            General Partner, Andrew E. Senyei,
                                              M.D.



           [SIGNATURE PAGE TO AMENDMENT NO. 2 TO AMENDED AND RESTATED
                            SHAREHOLDERS' AGREEMENT]
<PAGE>   30

                                ENTERPRISE PARTNERS III ASSOCIATES, L.P.


                                By:     Enterprise Management Partners III,
                                        L.P., Its General Partner


                                        By: /s/ Andrew Senyei
                                            ------------------------------------
                                            General Partner, Andrew E. Senyei,
                                              M.D.


                                MAYFIELD VIII, a California Limited Partnership


                                By:      Mayfield VIII Management, L.L.C. a
                                         Delaware limited liability company,
                                         its General Partner


                                         By: /s/ A. Grant Heidrich
                                             -----------------------------------
                                              General Partner


                                MAYFIELD ASSOCIATES FUND II, a California
                                Limited Partnership


                                By:      /s/ A. Grant Heidrich
                                         ---------------------------------------
                                          General Partner


                                CROSSPOINT VENTURE PARTNERS-1996

                                By: /s/ Don Milder
                                    --------------------------------------------
                                       Don Milder, General Partner



                                CROSSPOINT VENTURE PARTNERS LS-1997

                                By: /s/ Don Milder
                                    --------------------------------------------
                                       Don Milder, General Partner



           [SIGNATURE PAGE TO AMENDMENT NO. 2 TO AMENDED AND RESTATED
                            SHAREHOLDERS' AGREEMENT]

<PAGE>   31

                                AGILENT TECHNOLOGIES, INC., f/k/a
                                Hewlett-Packard Company

                                By:
                                   ---------------------------------------------

                                Its:
                                    --------------------------------------------



                                BRISTOL-MYERS SQUIBB COMPANY

                                By:
                                   ---------------------------------------------

                                Its:
                                    --------------------------------------------



                                RHONE-POULENC RORER INTERNATIONAL HOLDINGS, INC.

                                By:
                                   ---------------------------------------------

                                Its:
                                    --------------------------------------------



                                PACIFIC VENTURE GROUP II, L.P.

                                By: /s/ RALPH C. SABIN
                                   ---------------------------------------------

                                Its: Managing Director
                                    --------------------------------------------


           [SIGNATURE PAGE TO AMENDMENT NO. 2 TO AMENDED AND RESTATED
                            SHAREHOLDERS' AGREEMENT]

<PAGE>   32

                                BAYSTAR CAPITAL, LLP, a Delaware Limited
                                Partnership

                                By:    BayStar Capital Management, LLC,
                                       Its General Partner

                                By: /s/ Steve Lamar
                                    --------------------------------------------
                                        Steve Lamar, Vice President



                                BAYSTAR INTERNATIONAL LTD, a British Virgin
                                Islands Corporation

                                By:    BayStar International Management, LLC,
                                       Its General Partner

                                By: /s/ Steve Lamar
                                    --------------------------------------------
                                        Steve Lamar, Vice President



                                ------------------------------------------------
                                               Hayden J. Trubitt


                                AXYS PHARMACEUTICALS, INC.

                                By:
                                    --------------------------------------------
                                       William J. Newell, Sr. Vice President


                                PVG ASSOCIATES II, L.P.

                                By: PVG Equity Partners II, L.L.C.
                                     its General Partner

                                By: /s/ Ralph C. Sabin
                                    --------------------------------------------
                                    Ralph C. Sabin, Managing Director

                                    16830 Ventura Boulevard
                                    Suite 244
                                    Encino, California 91436



           [SIGNATURE PAGE TO AMENDMENT NO. 2 TO AMENDED AND RESTATED
                            SHAREHOLDERS' AGREEMENT]