Exhibit 5

3M Company
3M Center
St. Paul, MN 55144

February 8, 2023

Ladies and Gentlemen:

In my capacity as Associate General Counsel of 3M Company, a Delaware corporation (the “Company”), I am furnishing this opinion in connection with the filing by the Company of a Registration Statement on Form S-3 (the “Registration Statement”), under the Securities Act of 1933, as amended (the “Securities Act”), with the Securities and Exchange Commission (the “Commission”), registering the Company’s debt securities (the “Debt Securities”) and shares of common stock, par value $0.01 per share (the “Common Stock”), for proposed issuance and sale from time to time pursuant to Rule 415 under the Securities Act.

The Debt Securities will be issued from time to time pursuant to an indenture (the “Indenture”) relating to the Company’s senior debt securities, dated as of November 17, 2000, between the Company and The Bank of New York Mellon Trust Company, N.A., as successor trustee (the “Trustee”), as amended on July 29, 2011.

In connection with the foregoing, I have examined, or am familiar with, originals, or copies, certified or otherwise, identified to my satisfaction, of such documents, corporate records and other instruments as I have deemed necessary for the purpose of this opinion, including the following:  (a) the form of Registration Statement as filed herewith, including, among others, the exhibits thereto; (b) the Certificate of Incorporation of the Company; (c) the Amended and Restated Bylaws of the Company; and (d) the resolutions of the Board of Directors of the Company authorizing the filing of the Registration Statement.

Based upon the foregoing and subject to the limitations, qualifications and assumptions set forth herein, I am of the opinion that:

1.When (a) the appropriate corporate action has been taken by the Company to authorize the forms, terms, execution and delivery of any series of the Debt Securities, (b) the Debt Securities shall have been duly issued and executed in the form and containing the terms set forth in the Registration Statement, the Indenture and such corporate action, and delivered against payment of the authorized consideration therefor, (c) any legally required consents, approvals, authorizations and other orders of the Commission and any other regulatory authorities are obtained, and (d) the Debt Securities have been authenticated by the Trustee, then, such Debt Securities will be validly issued and will constitute valid and binding obligations of the Company in accordance with their terms, in each case subject to bankruptcy, insolvency, reorganization and other laws of general applicability relating to or affecting the enforcement of creditors’ rights and to general equity principles; and
   
2.When (a) the appropriate corporate action has been taken to authorize the issuance of Common Stock, (b) any legally required consents, approvals, authorizations and other orders of the Commission and any other regulatory authorities are obtained, (c) the Common Stock shall have been duly issued and delivered by the Company against payment of the authorized consideration therefor, and (d) certificates evidencing such shares of Common Stock have been duly executed by the authorized officers of the Company in accordance with applicable law, then, such Common Stock will be validly issued, fully paid and non-assessable (provided that the consideration paid therefor is not less than the par value thereof).

I am familiar with the proceedings heretofore taken by the Company in connection with the authorization, registration, issuance and sale of the Debt Securities and Common Stock.  I have, with your consent, relied as to factual matters on certificates or other documents furnished by the Company or its officers and by governmental authorities and upon such other documents and data that I have deemed appropriate. I have assumed the authenticity of all documents submitted to us as copies.

This opinion is limited to the Federal laws of the United States and the laws of the State of New York and the General Corporate Laws of the State of Delaware.  I am expressing no opinions as to the effect of the laws of any other jurisdiction.

I am aware that I am referred to under the heading “Legal Matters” in the Prospectus forming a part of the Registration Statement, and I hereby consent to such use of my name therein and to the use of this opinion for filing with the Registration Statement as Exhibit 5 thereto.  In giving this consent, I do not hereby admit that I am within the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission promulgated thereunder.

    Very truly yours,  
       
  /s/  Michael M. Dai  
    Michael M. Dai  
    Associate General Counsel  

2