<PAGE>   1
                                                       Exhibit 10.51



                          AMENDMENT, CONSENT AND WAIVER
                          -----------------------------

     This Amendment, Consent and Waiver (this "Waiver"), dated as of January 18,
1997, by and among American Home Products Corporation Acting Through Its
Wyeth-Ayerst Laboratories Division ("Wyeth-Ayerst"), ChemGenics Pharmaceuticals
Inc., a Delaware corporation (the "Company") and Millennium Pharmaceuticals,
Inc., a Delaware corporation ("Millennium").

     WHEREAS, Wyeth-Ayerst and the Company have entered into that certain
Collaborative Research and License Agreement dated November 1, 1996 (the
"License Agreement");

     WHEREAS, Wyeth-Ayerst is a party to that certain Series E Preferred Stock
Purchase Agreement dated November 27, 1996 by and among Wyeth-Ayerst, the
Company and certain other stockholders of the Company party thereto (the
"Purchase Agreement");

     WHEREAS, Wyeth-Ayerst is a party to that certain Standstill Agreement dated
November 27, 1996 by and among Wyeth-Ayerst and the Company (the "Standstill
Agreement");

     WHEREAS, Wyeth-Ayerst has been advised that the Company intends to execute
and deliver an Agreement and Plan of Merger (the "Merger Agreement") by and
among the Company, Millennium and CPI Acquisition Corp., a Delaware corporation
and a wholly-owned subsidiary of Millennium ("Sub"), pursuant to which, among
other things, Sub would be merged (the "Merger") with and into the Company and
the stockholders of the Company would receive, in the aggregate, approximately
4,800,000 shares of common stock, par value $.001 per share, of Millennium in
exchange for their capital stock of the Company ("Millennium Merger Shares");

     WHEREAS, the Merger would constitute an "Acquisition" for purposes of, and
as such term is defined in, Section 2.3.3(c) of the License Agreement;

     WHEREAS, the Stock Purchase Agreement provides that, unless the License
Agreement has been terminated, Wyeth-Ayerst may become obligated to purchase
additional shares of capital stock of the Company; and

     WHEREAS, the Standstill Agreement contains certain limitations and
restrictions on the actions of Wyeth-Ayerst with respect to the Company and the
capital stock of the Company;

     NOW, THEREFORE, in consideration of the foregoing premises and other good
and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereby agree as follows:


                                        1

<PAGE>   2

     Section 1. CONSENT TO ACQUISITION. Wyeth-Ayerst hereby consents to the
Merger and, to the extent that the Merger constitutes an "Acquisition" for
purposes of, and as such term is defined in, Section 2.3.3(c) of the License
Agreement, WyethAyerst hereby waives its right to terminate the R & D Program
(as such term is defined in the License Agreement) solely by virtue of the
Merger and Millennium hereby guarantees the performance by the Company of its
obligations under the R & D Program pursuant to the terms of the License
Agreement.

     Section 2. AMENDMENT OF ADDITIONAL EQUITY SALES. Upon and subject to the
occurrence of the Effective Time (as defined in the Merger Agreement), the
parties agree to make modifications to Sections 1.03, 2.03 and 2.04 of the
Purchase Agreement including, but not limited to, the following:

          (i) at the Second Closing (as defined in the Purchase Agreement),
          subject to the condition set forth in Section 2.03 of the Purchase
          Agreement, Millennium would be obligated to issue and sell to
          WyethAyerst, and Wyeth-Ayerst would be obligated to purchase from
          Millennium, for a purchase price of $3,000,000, a number of shares of
          common stock, par value $.001, of Millennium ("Millennium Common
          Stock"), such number of shares to be determined by dividing (i)
          $3,000,000 by (ii) 100% of the Market Price (as defined in the
          Purchase Agreement) of the Millennium Common Stock on the date of the
          Second Closing (the "Post-Merger Shares"); and

          (ii) the rights and obligations of the parties with respect to the
          Third Closing (as defined in the Purchase Agreement) will be
          terminated.

     Section 3. MANDATORY CONVERSION. Wyeth-Ayerst approves the mandatory
conversion of the outstanding shares of preferred stock, $.01 par value per
share, of the Company into shares of common stock of the Company, $.001 par
value per share, pursuant to Section 5(e)(i) of ARTICLE FOURTH of the Company's
Amended and Restated Certificate of Incorporation (the "Mandatory Conversion"),
such Mandatory Conversion to be effective immediately prior to, and subject to
occurrence of, the Effective Time (as defined in the Merger Agreement), and
agrees to (i) vote (or consent by written action as to) all shares of Capital
Stock of the Company that are beneficially owned by it, or as to which it has
voting authority, in favor of the Mandatory Conversion, and (ii) otherwise use
its reasonable efforts to ensure that the Mandatory Conversion is approved by
the requisite vote (or written consent) of stockholders of the Company, such
Mandatory Conversion to be effective immediately prior to, and subject to
occurrence of, the Effective Time.

     Section 4. REGISTRATION RIGHTS. Effective immediately prior to, and subject
to the occurrence of, the Effective Time, Wyeth-Ayerst agrees that, with respect
to the securities of the Company owned of record by it as of the Effective Time
(the

                                        2

<PAGE>   3


"Pre-Merger Shares"), all of its registration rights and similar rights
requiring the Company to register such Pre-Merger Shares on behalf of the
undersigned shall be terminated in their entirety and be of no further force or
effect and specifically acknowledges and agrees that such rights shall be
inapplicable to the Merger Shares delivered to the undersigned in the Merger.
Upon issuance of the Post-Merger Shares in accordance with Subsection 2(i)
above, Millennium hereby agrees to grant to Wyeth-Ayerst registration rights
with respect to such Post-Merger Shares on terms that are no less favorable than
the registration rights that the Company previously granted to Wyeth-Ayerst in
the Purchase Agreement.

     Section 5. "ACCREDITED INVESTOR" REPRESENTATION. Wyeth-Ayerst represents
that it is an "accredited investor" as defined in Rule 501 of Regulation D of
the Securities and Exchange Commission. Wyeth-Ayerst agrees to execute and
deliver such documents and instruments (including an Investor Questionnaire) and
to make such representations as shall be reasonably requested by Millennium to
ensure that the issuance and delivery of the Merger Shares in connection with
the Merger is exempt from the registration requirements of the Securities Act of
1933, as amended.

     Section 6. LOCK-UP AGREEMENT. Wyeth-Ayerst agrees that, with respect to (i)
100% of the Millennium Merger Shares issued and delivered to it pursuant to the
Merger for the period commencing on the Effective Time and ending on the date
that the Registration Statement on Form S-3 to be filed by the Buyer is
effective with respect to the sale of the Millennium Merger Shares (the "Date of
Effectiveness"), (ii) as to 50% of such Millennium Merger Shares with respect to
the period commencing on the Date of the Effectiveness and ending on July 31,
1997, and (iii) as to 25% of such Millennium Merger Shares with respect to the
period commencing on August 1, 1997 and ending on September 30, 1997, it shall
not sell, exchange, transfer, assign, pledge, dispose of or engage in any other
transaction with respect to the foregoing amounts of the Millennium Merger
Shares, including a transaction or arrangement that reduces the risk of loss by
short sale, hedging or otherwise.

     Section 7. STANDSTILL AGREEMENT. The parties hereby agree and acknowledge
that the Standstill Agreement shall remain in full force and effect following
the Effective Time, with all references therein to the "Company" being deemed to
refer to Millennium, and all reference to "Voting Securities" being deemed to
refer to shares of Common Stock of Millennium or any other securities
convertible into, exchangeable for or exercisable for Common Stock of
Millennium.

     Section 8. FURTHER ASSURANCES. Each party hereby agrees, at any time and
from time to time after the date hereof, at the reasonable request of the other
party, to execute and deliver such other agreements, certificates or instruments
as may be reasonably requested in order to more effectively evidence the
foregoing agreements.


                                        3

<PAGE>   4



     Section 9. EFFECT OF WAIVER. The parties hereby ratify and confirm all of
the provisions of the License Agreement and the Purchase Agreement, as modified
hereby, and agree and acknowledge that each of the License Agreement and the
Purchase Agreement, as so modified, remains in full force and effect.

     Section 10. COUNTERPARTS. This Waiver may be executed in any number of
Counterparts and each of such counterparts shall for all purposes be deemed to
be an original, and all such counterparts shall together constitute but one and
the same instrument.

                  [Remainder of page intentionally left blank.]


                                        4

<PAGE>   5


     IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed and attested, all as of the day and year first above written.


                                               CHEMGENICS PHARMACEUTICALS INC.


                                               By: /s/ Barry A. Berkowitz
                                                  ----------------------------
                                                  Barry A. Berkowitz
                                                  President


                                               AMERICAN HOME PRODUCTS
                                               CORPORATION
                                               ACTING THROUGH ITS
                                               WYETH-AYERST LABORATORIES
                                               DIVISION


                                               By: /s/ Charles N. Ross
                                                  ----------------------------
                                               Name: Charles N. Ross
                                                    --------------------------
                                               Title: Assistant Treasury
                                                     -------------------------

                                               MILLENNIUM PHARMACEUTICALS, INC.


                                               By: /s/ Mark J. Levin
                                                  ----------------------------
                                               Name: Mark J. Levin
                                                    --------------------------
                                               Title: President
                                                     -------------------------

                                        5