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

​

Exhibit 5.1

March 19, 2018

Archrock, Inc.
9807 Katy Freeway, Suite 100
Houston, TX 77024

Re:
  Registration Statement No. 333-222872 on Form S-4; Shares of Common Stock, par value $0.01 per share, of Archrock, Inc.

Ladies and Gentlemen:

We have acted as special counsel to Archrock, Inc., a Delaware corporation ("AROC"), in connection with the proposed issuance of common stock, par value $0.01 per share, of AROC (the "Shares"), pursuant to the terms and conditions of the Agreement and Plan of Merger, dated as of January 1, 2018, by and among AROC, Archrock Partners, L.P. ("APLP"), a Delaware limited partnership, Archrock General Partner, L.P., a Delaware limited partnership and the general partner of APLP (the "General Partner"), and Archrock GP LLC, a Delaware limited liability company and the general partner of the General Partner (the "Managing GP"), as amended by Amendment No. 1 to the Agreement and Plan of Merger, dated as of January 11, 2018 (as amended, the "Merger Agreement"), by and among AROC, APLP, the General Partner, the Managing GP and Amethyst Merger Sub LLC, a Delaware limited liability company and indirect wholly owned subsidiary of AROC.

The Shares are included in a registration statement on Form S-4 under the Securities Act of 1933, as amended (the "Act"), filed with the Securities and Exchange Commission (the "Commission") on March 16, 2018 (the "Registration Statement"). This opinion is being furnished in connection with the requirements of Item 601(b)(5) of Regulation S-K under the Act, and no opinion is expressed herein as to any matter pertaining to the contents of the Registration Statement or related prospectus, other than as expressly stated herein with respect to the issuance of the Shares.

As such counsel, we have examined such matters of fact and questions of law as we have considered appropriate for purposes of this letter. With your consent, we have relied upon certificates and other assurances of officers of AROC and others as to factual matters without having independently verified such factual matters. We are opining herein as to the General Corporation Law of the State of Delaware (the "DGCL"), and we express no opinion with respect to any other laws.

​

​ | ​ | ​
​ March 19, 2018 | ​ | ​
​ Page1 | ​ | ​
​ | ​ | ​

​

Subject to the foregoing and the other matters set forth herein, it is our opinion that, as of the date hereof, upon issuance and delivery of the Shares in the manner contemplated by the Registration Statement and the Merger Agreement, the Shares will be validly issued, fully paid and nonassessable. In rendering the foregoing opinion, we have assumed that AROC will comply with all applicable notice requirements regarding uncertificated shares provided in the DGCL.

This opinion is for your benefit in connection with the Registration Statement and may be relied upon by you and by persons entitled to rely upon it pursuant to the applicable provisions of the Act. We consent to your filing this opinion as an exhibit to the Registration Statement and to the reference to our firm in the prospectus contained in the Registration Statement under the heading "Legal Matters." 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 Act or the rules and regulations of the Commission thereunder.

|  | Very truly yours,
|  | /s/ Latham & Watkins LLP

QuickLinks

Exhibit 5.1