EXHIBIT 5.1
Troutman Pepper Locke LLP
600 Travis Street, Suite 2800
Houston, TX 77002
troutman.com

image.jpg
image_1.jpg

July 28, 2026
Western Midstream Partners, LP
9950 Woodloch Forest Drive, Suite 2800
The Woodlands, Texas 77380

Re: Registration Statement on Form S-3
Ladies and Gentlemen:
We refer to the Registration Statement on Form S-3 (the “Registration Statement”) being filed by Western Midstream Partners, LP, a Delaware limited partnership (the “Partnership”), with the Securities and Exchange Commission (the “SEC”) under the Securities Act of 1933, as amended (the “Securities Act”), relating to the registration of 19,389,239 common units representing limited partner interests in the Partnership (the “Common Units”) issued by the Partnership to the selling unitholders named in the Registration Statement (the “Selling Unitholders”) in connection with the offer and sale of the Common Units from time to time by the Selling Unitholders.
This opinion letter is being delivered in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Securities Act.
We have examined (i) the Registration Statement and the exhibits thereto; (ii) the Partnership’s Certificate of Limited Partnership, as amended to date (the “Certificate of Limited Partnership”); (iii) the Partnership’s Second Amended and Restated Agreement of Limited Partnership, as amended to date (the “Partnership Agreement” and, together with the Certificate of Limited Partnership, the “Partnership Organizational Documents”); (iv) the Certificate of Formation of Western Midstream Holdings, LLC (f/k/a Western Gas Equity Holdings, LLC), a Delaware limited liability company and the general partner of the Partnership (the “General Partner” and together with the Partnership, the “WES Entities”), as amended to date; (v) the Second Amended and Restated Limited Liability Company Agreement of the General Partner, as amended to date; and (vi) resolutions adopted by the board of directors of the General Partner (the “Partnership Board”). We have also examined originals, or copies of originals certified to our satisfaction, of such agreements, documents, certificates and statements of the WES Entities and other corporate documents and instruments, and have examined such questions of law, as we have considered relevant and necessary as a basis for this opinion letter. We have assumed the authenticity of all documents submitted to us as originals, the genuineness of all signatures, the legal capacity of all persons and the conformity with the original documents of any copies thereof submitted to us for examination. As to facts relevant to the opinions expressed herein, we have relied without independent investigation or verification upon, and assumed the accuracy and completeness of, certificates, letters and oral and written statements and representations of public officials and officers and other representatives of the WES Entities.
Based upon and subject to the foregoing and the other limitations, qualifications and assumptions set forth herein, we are of the opinion that the Common Units have been duly authorized, validly issued



July 28, 2026
Page 2
image.jpg
image_1.jpg
and, under the Delaware Revised Uniform Limited Partnership Act (the “DRULPA”), holders of such Common Units will have no obligation, solely by reason of their ownership of such Common Units, to make any contributions to the Partnership or any further payments for their purchase of such Common Units and will have no personal liability, solely by reason of their ownership of such Common Units, to creditors of the Partnership for any of its debts, liabilities or other obligations.
This opinion letter is limited to the DRULPA and the Delaware Limited Liability Company Act. We express no opinion as to the laws, rules or regulations of any other jurisdiction, including, without limitation, the federal laws of the United States of America or any state securities or blue sky laws.
We hereby consent to the filing of this opinion letter as an exhibit to the Registration Statement and to all references to our Firm included in or made a part of the Registration Statement. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act.
Very truly yours,
/s/ Troutman Pepper Locke LLP

2