EX-5.1 2 a2237096zex-5_1.htm EX-5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

LOGO

November 13, 2018

USA Compression Partners, LP
100 Congress Avenue, Suite 450
Austin, Texas 78701

Ladies and Gentlemen:

        We have acted as counsel for USA Compression Partners LP, a Delaware limited partnership (the "Partnership"), with respect to certain legal matters in connection with the preparation of a registration statement on Form S-3 (the "Registration Statement") filed on the date hereof with the Securities and Exchange Commission (the "Commission") in connection with the registration under the Securities Act of 1933, as amended (the "Securities Act"), of the offer and resale, from time to time, pursuant to Rule 415 under the Securities Act, by the selling unitholders identified in the Registration Statement (the "Selling Unitholders"), of up to 41,202,553 common units representing limited partner interests in the Partnership ("Selling Unitholder Units").

        We have also participated in the preparation of the Prospectus (the "Prospectus") contained in the Registration Statement to which this opinion is an exhibit. The Selling Unitholder Units will be offered in amounts, at prices and on terms to be determined in light of market conditions at the time of sale and to be set forth in supplements (each, a "Prospectus Supplement") to the Prospectus.

        In rendering the opinion set forth below, we have examined (i) the Registration Statement, including the Prospectus, (ii) the Second Amended and Restated Agreement of Limited Partnership of the Partnership (the "Partnership Agreement"), (iii) the Certificate of Limited Partnership of the Partnership filed with the Secretary of State of the State of Delaware, (iv) the Certificate of Formation of USA Compression GP, LLC (the "General Partner") filed with the Secretary of State of the State of Delaware, (v) the Amended and Restated Limited Liability Company Agreement of the General Partner, and (vi) such other certificates and documents as we have deemed necessary or appropriate for purposes of the opinion hereafter expressed.

        In connection with rendering the opinion set forth below, we have assumed that:

              (i)  all information contained in all documents reviewed by us is true and correct;

             (ii)  all signatures on all documents examined by us are genuine;

            (iii)  all documents submitted to us as originals are authentic and complete and all documents submitted to us as copies conform to the originals of those documents;

            (iv)  each certificate from governmental officials reviewed by us is accurate, complete and authentic, and all official public records are accurate and complete;

             (v)  the Registration Statement, and any amendments thereto (including post-effective amendments), will have become effective and comply with all applicable laws;

   

GRAPHIC


            (vi)  a Prospectus Supplement to the Prospectus will have been prepared and filed with the Commission describing the Securities and Selling Unitholder Units offered thereby and will comply with all applicable laws;

           (vii)  all Securities and Selling Unitholder Units will be issued and sold in compliance with applicable federal and state securities laws and in the manner stated in the Registration Statement and the applicable Prospectus Supplement to the Prospectus; and

            (ix)  a definitive purchase, underwriting or similar agreement with respect to any Selling Unitholder Units offered will have been duly authorized and validly executed and delivered by the Partnership or the Selling Unitholders, as applicable, and the other parties thereto.

        Based upon and subject to the foregoing, we are of the opinion that:

            (1)   when issued, the Selling Unitholder Units will be, and upon sale will continue to be, validly issued, and are fully paid (to the extent required under the Partnership Agreement) and nonassessable (except as such nonassessability may be affected by Section 17-607 or 17-804 of the Delaware Revised Uniform Limited Partnership Act (the "DRULPA") and as described in the Prospectus Supplement and the Prospectus).

        The opinion expressed herein is qualified in the following respects:

              (i)  This opinion is limited in all respects to the DRULPA, the Delaware Limited Liability Company Act, the Delaware General Corporation Law and the Constitution of the State of Delaware, as interpreted by the courts of the State of Delaware, the contract law of the State of Texas, the laws of the State of New York and the federal laws of the United States of America and we are expressing no opinion as to the effect of the laws of any other jurisdiction, domestic or foreign.

             (ii)  We express no opinion as to any matters other than as expressly set forth above, and no opinion on any other matter may be inferred or implied herefrom. The opinion expressed herein is given as of the date hereof, and we undertake no, and hereby disclaim any, obligation to advise you of any change in any matter set forth herein.

        We hereby consent to the reference to this firm under the caption "Legal Matters" in the Prospectus and to the filing of this opinion as an exhibit to the Registration Statement. By giving such consent, we do not admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission issued thereunder.

    Very truly yours,

 

 

/s/ VINSON & ELKINS L.L.P.

 

 

Vinson & Elkins L.L.P.

2




QuickLinks