<PAGE>
                                                                       EXHIBIT 5


                        [BAKER BOTTS L.L.P. LETTERHEAD]

November 20, 2001



018484.0200

Banc of America Securities LLC
J.P. Morgan Securities Inc.
Salomon Smith Barney Inc.
ABN AMRO Incorporated
Credit Suisse First Boston Corporation
Fleet Securities, Inc.
Goldman, Sachs & Co.
Lehman Brothers Inc.
Merrill Lynch, Pierce, Fenner & Smith
            Incorporated
Morgan Stanley & Co. Incorporated
PNC Capital Markets, Inc.

c/o J.P. Morgan Securities Inc.
270 Park Avenue
New York, NY 10017

                             WASTE MANAGEMENT, INC.
                          6 1/2% SENIOR NOTES DUE 2008

Gentlemen:

                  This opinion is being furnished pursuant to Section 6(b) of
the Underwriting Agreement dated November 15, 2001 (the "Underwriting
Agreement") by and between Waste Management, Inc., a Delaware corporation (the
"Company"), and Banc of America Securities LLC, J.P. Morgan Securities Inc. and
Salomon Smith Barney Inc., as Representatives of the several Underwriters named
in Schedule II of the Underwriting Agreement (the "Underwriters"), relating to
the issuance and sale by the Company to the Underwriters of $400,000,000
aggregate principal amount of the Company's 6 1/2% Senior Notes due 2008 (the
"Notes") to be issued pursuant to an Indenture (the "Indenture") dated as of
September 10, 1997 between the Company, formerly known as USA Waste Services,
Inc., and JPMorgan Chase Bank, as successor to The Chase Manhattan Bank, as
trustee (the "Trustee"). Capitalized terms used but not defined herein shall
have the meaning ascribed to such terms in the Underwriting Agreement.

                  The Company has prepared and filed with the Securities and
Exchange Commission (the "Commission") a registration statement on Form S-3
(Registration No. 333-80063) for the registration under the Securities Act of
1933, as amended (the "Securities Act"),
<PAGE>
[BAKER BOTTS L.L.P. LETTERHEAD]

                                       2                       November 20, 2001


of the offering and sale of debt securities, including the Notes, from time to
time in accordance with Rule 415 of the rules and regulations under the
Securities Act. For purposes hereof, "Effective Date" means the date and time as
of which Post-Effective Amendment No. 1 to such registration statement was
declared effective by the Commission. Such registration statement, as amended
pursuant to the Securities Act, including all documents incorporated or deemed
incorporated by reference therein, is hereinafter referred to as the
"Registration Statement," and the Company's prospectus dated February 14, 2000,
as supplemented by the Company's prospectus supplement thereto dated November
15, 2001, all as first filed with the Commission pursuant to Rule 424(b) under
the Securities Act, including the documents incorporated by reference therein,
is hereinafter referred to as the "Final Prospectus."

                  We have examined the originals, or copies certified or
otherwise identified, of the Restated Certificate of Incorporation and Bylaws of
the Company, each as amended to date, corporate records of the Company and
certain subsidiaries, including minute books of the Company and certain
subsidiaries, as furnished to us by the Company, certificates of public
officials and of representatives of the Company, statutes and other instruments
and documents, as a basis for the opinions hereinafter expressed. In giving the
opinions set forth below, we have relied upon certificates, statements or other
representations of officers or authorized agents of the Company with respect to
the accuracy of the factual matters contained in or covered by such
certificates, statements or representations. In making our examination, we have
assumed that all signatures on all documents examined by us are genuine, all
documents submitted to us as originals are authentic and complete, all documents
submitted to us as certified or photostatic copies are true and correct copies
of the originals thereof and that all information submitted to us was accurate
and complete.

                  On the basis of the foregoing, and subject to the assumptions,
limitations, qualifications and exceptions set forth herein, we are of the
opinion that:

                  1. The Company is a corporation duly incorporated and validly
         existing in good standing under the laws of the State of Delaware.

                  2. The Company has corporate power and authority to own, lease
         and operate its properties and to conduct its business as described in
         the Final Prospectus and to execute and deliver and perform its
         obligations under the Underwriting Agreement.

                  3. The Underwriting Agreement has been duly authorized,
         executed and delivered by the Company.

                  4. The Indenture has been duly authorized, executed and
         delivered by the Company and (assuming the due authorization, execution
         and delivery thereof by the Trustee) constitutes a valid and binding
         agreement of the Company, enforceable against the Company in accordance
         with its terms, except as the enforcement thereof may be limited by
         bankruptcy, insolvency, fraudulent transfer, reorganization, moratorium
         or similar laws affecting enforcement of creditors' rights and remedies
         generally and except as enforcement thereof is subject to general
         principles of equity (regardless of whether enforcement is considered
         in a proceeding in equity or at law).
<PAGE>
[BAKER BOTTS L.L.P. LETTERHEAD]

                                       3                       November 20, 2001


                  5. The global certificate representing the Notes is in a form
         authorized by the Indenture, the Notes have been duly authorized by the
         Company and, assuming the global certificate representing the Notes has
         been authenticated by the Trustee in the manner provided for in the
         Indenture and delivered against payment of the consideration therefor
         specified in the Underwriting Agreement, the Notes constitute valid and
         binding obligations of the Company, enforceable against the Company in
         accordance with their terms, except as the enforcement thereof may be
         limited by bankruptcy, insolvency, fraudulent transfer, reorganization,
         moratorium or similar laws affecting enforcement of creditors' rights
         and remedies generally and except as enforcement thereof is subject to
         general principles of equity (regardless of whether enforcement is
         considered in a proceeding in equity or at law), and each registered
         holder thereof is entitled to the benefits of the Indenture.

                  6. The Indenture has been duly qualified under the 1939 Act.

                  7. The Notes and the Indenture conform as to legal matters in
         all material respects to the descriptions thereof contained in the
         Final Prospectus.

                  8. The Registration Statement has been declared effective
         under the Act; any required filing of the Final Prospectus pursuant to
         Rule 424(b) has been made in the manner and within the time period
         required by Rule 424(b); and, to the best of our knowledge, no stop
         order suspending the effectiveness of the Registration Statement has
         been issued and no proceedings for that purpose have been instituted or
         are pending or threatened under the Act.

                  9. No authorization, approval, consent or license of any
         regulatory body or authority (other than under the Act, the 1939 Act
         and the securities or Blue Sky laws of the various states) and no
         approval of the stockholders of the Company is required for the valid
         authorization, issuance, sale and delivery of the Notes by the Company,
         or performance of the Indenture.

                 10. The execution and delivery of the Underwriting Agreement,
         the consummation of the transactions contemplated in the Underwriting
         Agreement and compliance with the terms of the Underwriting Agreement
         and the Indenture, do not and will not conflict with or result in a
         breach of any of the terms or provisions of, or constitute a default
         under, the charter or by-laws of the Company or its subsidiaries listed
         on Schedule I (the "Subsidiaries"), or any indenture, mortgage or other
         agreement or instrument to which the Company or its Subsidiaries is a
         party or by which they or any of their property is bound that is filed
         as an exhibit to the Registration Statement or to any of the documents
         incorporated by reference in the Final Prospectus, or any existing
         applicable laws, rule, regulation (excluding any securities or
         anti-fraud law, rule or regulation).

                 11. The Company is not an "investment company" or an entity
         "controlled" by an "investment company," as such terms are defined in
         the 1940 Act.
<PAGE>
[BAKER BOTTS L.L.P. LETTERHEAD]

                                       4                       November 20, 2001


                 12. Neither the Company nor any subsidiary is a "holding
         company" or a "public utility," as such terms are defined in the 1935
         Act.

                  On the basis of our review described below, we also advise you
that the Registration Statement and the Final Prospectus, excluding the
documents incorporated by reference therein and the financial statements and
other financial data and supporting schedules included therein or omitted
therefrom and the Trustee's Statement of Eligibility on Form T-1, as to which we
have not been asked to comment, as of the Effective Date and its issue date,
respectively, appear on their face to have been appropriately responsive in all
material respects with the requirements of the Securities Act.

                  In addition, we have participated in conferences with officers
and other representatives of the Company, counsel employed by the Company,
representatives of the independent public accountants of the Company,
representatives of the Underwriters and counsel to the Underwriters at which the
contents of the Registration Statement and the Final Prospectus were discussed
and, although we did not independently verify such information and are not
passing upon and do not assume any responsibility for the accuracy, completeness
or fairness of the statements contained in the Registration Statement and the
Final Prospectus (other than as set forth in paragraph 7 above), on the basis of
the foregoing, no facts came to our attention that led us to believe that the
Registration Statement (other than the financial statements, the notes thereto
and the auditors' reports thereon and the related schedules and the other
financial and accounting data included or incorporated by reference therein, or
omitted therefrom, and the exhibits thereto, as to which we have not been asked
to comment) as of the date of the Underwriting Agreement contained an untrue
statement of a material fact or omitted to state a material fact required to be
stated therein or necessary in order to make the statements therein not
misleading, or that the Final Prospectus (other than the financial statements,
the notes thereto and the auditors' reports thereon and the related schedules
and the other financial and accounting data included or incorporated by
reference therein, or omitted therefrom, as to which we have not been asked to
comment) as of its issue date or the Closing Date contained or contains an
untrue statement of a material fact or omitted or omits to state a material fact
necessary in order to make the statements therein, in the light of the
circumstances under which they were made, not misleading.

                  The opinions set forth above are limited in all respects to
matters of the laws of the State of Texas, the contract law of the State of New
York, the General Corporation Law of the State of Delaware and applicable
federal law of the United States, each as in effect on the date hereof. The
opinions set forth above are solely for the benefit of the Underwriters in
connection with the transactions consummated on the date hereof pursuant to the
Underwriting Agreement and may be relied upon only by the Underwriters named
therein and may not be relied upon by any other person or for any other purpose.
This opinion speaks as of the date hereof, and we disclaim any obligation to
update this opinion.

                                    Very truly yours,


                                    /s/ BAKER BOTTS L.L.P.

JDK/ERH

<PAGE>
[BAKER BOTTS L.L.P. LETTERHEAD]

                                       5                       November 20, 2001


SCHEDULE I

                           SUBSIDIARIES OF THE COMPANY



Waste Management Holdings, Inc.

Wheelabrator Technologies, Inc.


