<PAGE>   1
                                                                  EXHIBIT 10.21

                         MICROCIDE PHARMACEUTICALS, INC.

                              CONSULTING AGREEMENT


        This Consulting Agreement ("Agreement") is made and entered into as of
the 14th day of January, 1998, by and between Microcide Pharmaceuticals, Inc.
(the "Company"), and Keith Bostian ("Consultant"). The Company desires to retain
Consultant as an independent contractor to perform consulting services for the
Company in the field of research and development of products for infectious
diseases caused by bacteria and fungi for use in human health, animal health,
agriculture, or other applications, which products may include but are not
limited to small molecules, vaccines, antisense, gene, antibody, protein,
peptides, or diagnostics (the "Field") and Consultant is willing to perform such
services, on terms set forth more fully below. In consideration of the mutual
promises contained herein, the parties agree as follows:

        1.     SERVICES AND COMPENSATION

               (a) Consultant agrees to perform for the Company the services
("Services") described in Exhibit A, attached hereto in the Field.

               (b) The Company agrees to pay Consultant the compensation set
forth in Exhibit A for the performance of the Services.

        2.     CONFIDENTIALITY

               (a) "Confidential Information" means any Company proprietary
information, technical data, trade secrets or know-how, including, but not
limited to, research, product plans, products, services, customers, customer
lists, markets, developments, inventions, processes, formulas, technology,
designs, drawings, engineering, marketing, finances or other business
information disclosed by the Company either directly or indirectly in writing,
orally or by drawings or inspection of parts or equipment.

               (b) Consultant will not, during or subsequent to the term of this
Agreement, use the Company's Confidential Information for any purpose whatsoever
other than the performance of the Services on behalf of the Company or disclose
the Company's Confidential Information to any third party. It is understood that
said Confidential Information shall remain the sole property of the Company.
Consultant further agrees to take all reasonable precautions to prevent any
unauthorized disclosure of such Confidential Information including, but not
limited to, having each employee of Consultant, if any, with access to any
Confidential Information, execute a nondisclosure agreement containing
provisions in the Company's favor identical to Sections 2, 3 and 5 of this
Agreement. Confidential Information does not include information which (i) is
known to Consultant at the time of disclosure to Consultant by the Company as
evidenced by written records of Consultant, (ii) has become publicly known and
made generally available through no wrongful act of Consultant, or (iii) has
been rightfully received by Consultant from a third party who is authorized to
make such disclosure.







<PAGE>   2

               (c) Consultant agrees that Consultant will not, during the term
of this Agreement, improperly use or disclose any proprietary information or
trade secrets of any former or current employer or other person or entity with
which Consultant has an agreement or duty to keep in confidence information
acquired by Consultant, if any.

               (d) Consultant recognizes that the Company has received and in
the future will receive from third parties their confidential or proprietary
information subject to a duty on the Company's part to maintain the
confidentiality of such information and to use it only for certain limited
purposes. Consultant agrees that Consultant owes the Company and such third
parties, during the term of this Agreement and thereafter, a duty to hold all
such confidential or proprietary information in the strictest confidence and not
to disclose it to any person, firm or corporation or to use it except as
necessary in carrying out the Services for the Company consistent with the
Company's agreement with such third party.

               (e) Upon the termination of this Agreement, or upon Company's
earlier request, Consultant will deliver to the Company all of the Company's
property or Confidential Information that Consultant may have in Consultant's
possession or control.

        3.     OWNERSHIP

               (a) Consultant agrees that all copyrightable material, notes,
records, drawings, designs, inventions, improvements, developments, discoveries
and trade secrets (collectively, "Inventions") conceived, made or discovered by
Consultant in the course of consultation with the Company, solely or in
collaboration with others, during the period of this Agreement which relate
solely to the Field, are the sole property of the Company and shall be disclosed
by the Consultant to the Company. In addition, any Inventions which constitute
copyrightable subject matter shall be considered "works made for hire" as that
term is defined in the United States Copyright Act. Consultant further agrees to
assign (or cause to be assigned) and does hereby assign fully to the Company all
Inventions and any copyrights, patents, mask work rights or other intellectual
property rights relating thereto solely in the Field.

               (b) Consultant agrees to assist Company, or its designee, at the
Company's expense, in every proper way to secure the Company's rights in the
Inventions and any copyrights, patents, mask work rights or other intellectual
property rights relating thereto in any and all countries, including the
disclosure to the Company of all pertinent information and data with respect
thereto, the execution of all applications, specifications, oaths, assignments
and all other instruments which the Company shall deem necessary in order to
apply for and obtain such rights and in order to assign and convey to the
Company, its successors, assigns and nominees the sole and exclusive right,
title and interest in and to such Inventions, and any copyrights, patents, mask
work rights or other intellectual property rights relating thereto. Consultant
further agrees that Consultant's obligation to execute or cause to be executed,
when it is in Consultant's power to do so, any such instrument or papers shall
continue after the termination of this Agreement.

               (c) Consultant agrees that if the Company is unable because of
Consultant's unavailability, dissolution, mental or physical incapacity, or for
any other reason, to secure Consultant's signature to apply for or to pursue any
application for any United States or foreign patents or mask work or copyright
registrations covering the Inventions assigned to the Company above, then
Consultant hereby irrevocably designates and appoints the Company and its duly
authorized officers and agents as Consultant's agent and attorney in fact, to
act for and in Consultant's behalf and stead to execute and file any such
applications and to do all other lawfully permitted acts to further the
prosecution and issuance of patents,






                                       -2-

<PAGE>   3

copyright and mask work registrations thereon with the same legal force and
effect as if executed by Consultant.

        4.     REPORTS

               Consultant agrees that it will from time to time during the term
of this Agreement or any extension thereof keep the Company advised as to
Consultant's progress in performing the Services hereunder and that Consultant
will, as requested by the Company, prepare written reports with respect thereto.
It is understood that the time required in the preparation of such written
reports shall be considered time devoted to the performance of Consultant's
Services.

        5.     CONFLICTING OBLIGATIONS

               (a) Consultant certifies that Consultant has no outstanding
agreement or obligation that is in conflict with any of the provisions of this
Agreement, or that would preclude Consultant from complying with the provisions
hereof, and further certifies that Consultant will not enter into any such
conflicting Agreement during the term of this Agreement. Notwithstanding the
foregoing, the Company acknowledges that it is aware of Consultant's Employment
Agreement with Newco and acknowledges that such agreement is not in conflict
with this Agreement.

               (b) During the term of this Agreement Consultant will not
directly consult to, advise, or participate in the ownership, management,
operation, control or financing of, or be connected as an officer, director,
employee, partner, principal, agent, representative, consultant or otherwise
with regard to any person, business or enterprise which is engaged in
competition with Microcide or its affiliates, with regard to the research and
development of products for infectious diseases caused by bacteria or fungi as
reasonably determined by Microcide.

        6.     TERM AND TERMINATION

               (a) This Agreement will commence on the date first written above
and will continue for a period of two (2) years or termination as provided
below.

               (b) The Company may terminate this Agreement upon giving ninety
(90) days prior written notice thereof to Consultant. Any such notice shall be
addressed to Consultant at the address shown below or such other address as
either party may notify the other of and shall be deemed given upon delivery if
personally delivered, or forty-eight (48) hours after deposited in the United
States mail, postage prepaid, registered or certified mail, return receipt
requested. The Company may terminate this Agreement immediately and without
prior notice if Consultant refuses to or is unable to perform the Services or is
in breach of any material provision of this Agreement.

               (c) Upon such termination all rights and duties of the parties
toward each other shall cease except:

                      (i)    that the Company shall be obliged to pay, within
thirty (30) days of the effective date of termination, all amounts owing to
Consultant for Services completed and accepted by the Company prior to the
termination date and related expenses, if any, in accordance with the provisions
of Section 1 (Services and Compensation) hereof; and





                                       -3-

<PAGE>   4



                      (ii)   Sections 2 (Confidentiality), 3 (Ownership) and 8
(Independent Contractors) shall survive termination of this Agreement.

        7.     ASSIGNMENT

               Neither this Agreement nor any right hereunder or interest herein
may be assigned or transferred by Consultant without the express written consent
of the Company.

        8.     INDEPENDENT CONTRACTOR

               Nothing in this Agreement shall in any way be construed to
constitute Consultant as an agent, employee or representative of the Company,
but Consultant shall perform the Services hereunder as an independent
contractor. Consultant acknowledges and agrees that Consultant is obligated to
report as income all compensation received by Consultant pursuant to this
Agreement, and Consultant agrees to and acknowledges the obligation to pay all
self-employment and other taxes thereon. Consultant further agrees to indemnify
the Company and hold it harmless to the extent of any obligation imposed on
Company (i) to pay in withholding taxes or similar items or (ii) resulting from
Consultant's being determined not to be an independent contractor.

        9.     ARBITRATION AND EQUITABLE RELIEF

               (a) Except as provided in Section 9(b) below, the Company and
Consultant agree that any dispute or controversy arising out of or relating to
any interpretation, construction, performance or breach of this Agreement, shall
be resolved through a mediation-arbitration approach. The parties agree to
select a mutually agreeable, neutral third party to help them mediate any
dispute that arises under the terms of this Agreement. Costs and fees associated
with the mediation shall be shared equally by the parties. If the mediation is
unsuccessful, the parties agree that the dispute shall be decided by a single
arbitrator by binding arbitration under the rules of the American Arbitration
Association. The decision of the arbitrator shall be final and binding on the
parties and may be entered and enforced in any court of competent jurisdiction
by either party. The prevailing party in the arbitration proceedings shall be
awarded reasonable attorney fees, expert witness costs and expenses, and all
other costs and expenses incurred directly or indirectly in connection with the
proceedings, unless the arbitrator shall for good cause determine otherwise.

               (b) Consultant agrees that it would be impossible or inadequate
to measure and calculate the Company's damages from any breach of the covenants
set forth in Sections 2 or 3 herein. Accordingly, Consultant agrees that if
Consultant breaches Sections 2 or 3, the Company will have available, in
addition to any other right or remedy available, the right to obtain from any
court of competent jurisdiction an injunction restraining such breach or
threatened breach and specific performance of any such provision. Consultant
further agrees that no bond or other security shall be required in obtaining
such equitable relief and Consultant hereby consents to the issuances of such
injunction and to the ordering of such specific performance.

        10.    GOVERNING LAW

               This Agreement shall be governed by the laws of the State of
California.







                                      -4-

<PAGE>   5

        11.    ENTIRE AGREEMENT

               This Agreement is the entire agreement of the parties and
supersedes any prior agreements between them with respect to the subject matter
hereof.


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



                                        KEITH A. BOSTIAN, PH.D.



                                        By:___________________________________


                                        Address:______________________________




                                        MICROCIDE PHARMACEUTICALS, INC.



                                        By:___________________________________

                                        Title:________________________________

                                        Address:______________________________






<PAGE>   6

                                    EXHIBIT A

                            SERVICES AND COMPENSATION



1.      Contact.  Consultant's principal Company contact:

               Name:  James Rurka

               Title:  Chief Executive Officer

2.      Services. Consultant will render to the Company the following Services:

        (a)   General scientific consulting in the field;

        (b)   Attendance at and participation in Research Coordination Board and
              Scientific Advisory Board Meetings;

        (c)   Attendance at and participation in project team meetings with
              corporate partners; and

        (d)   Assistance in corporate development activities.

              Consultant shall provide forty-eight (48) days of Services during
              the first year of the Agreement and twenty-four (24) days of
              Services during the second year of the Agreement. Consultant shall
              remain a member of the Board of Directors of the Company.

3.      Compensation.

        (a) The Company shall pay Consultant, in monthly installments, a total
        of $48,000 for the first year of Services rendered and a total of
        $24,000 for the second year of Services rendered under the Agreement.
        Consultant shall not receive any additional compensation for attendance
        at meetings of the Company's Board of Directors.

        (b) The Company shall permit options granted to the Consultant which
        have not then vested to continue to vest during the term of the
        Agreement.

        (c) The Company shall reimburse Consultant for all reasonable travel and
        living expenses incurred by Consultant in performing Services pursuant
        to this Agreement, in accordance with standard company policy regarding
        reimbursable expenses.

        (d) Consultant shall submit all statements for services and expenses in
        a form prescribed by the Company and such statement shall be approved by
        the contact person listed above.