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


Exhibit 5.1

[LETTERHEAD OF HOLME ROBERTS & OWEN LLP]

June 8, 2005

Cimarex Energy Co.
1700 Lincoln Street, Suite 1800
Denver, Colorado 80203-4518

Re:
Registration Statement on Form S-8

Ladies and Gentlemen:

        Reference is made to the registration statement on Form S-8 to be filed with the Securities and Exchange Commission (the "Commission") on or about June 8, 2005 (the "Registration Statement") by Cimarex Energy Co., a Delaware corporation (the "Company"), for the purpose of registering under the Securities Act of 1933, as amended (the "Act"), 5,950,000 shares of its common stock, par value $0.01 per share (the "Common Stock"), which may be offered and issued under the Cimarex Energy Co. 2002 Stock Incentive Plan and the Cimarex Energy Co. 401(k) Plan (collectively the "Plans").

        This opinion is being furnished in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Act.

        In connection with this opinion, we have examined the Company's Amended and Restated Certificate of Incorporation and Bylaws, the originals or copies certified to our satisfaction of certain corporate records and proceedings of the Company, and a certificate of the Secretary of the Company with respect to actions taken by the Company's Board of Directors in respect of the authorization and issuance of the Shares and related matters, and such other certificates, instruments and documents as we deemed appropriate to enable us to render the opinion expressed below.

        In all such examinations, we have assumed, without independent investigation or inquiry, the legal capacity of all natural persons executing documents, the genuineness of all signatures on original or certified copies, the authenticity of all original or certified copies and the conformity to original or certified documents of all copies submitted to us as conformed or reproduction copies. We have relied as to factual matters upon and have assumed the accuracy of, the statements made in the certificates of officers of the Company delivered to us and the certificates and other statements or information of or from public officials and officers and representatives of the Company.

        Based upon the foregoing and the limitations, qualifications, exceptions and assumptions set forth herein, we are of the opinion that the Shares have been duly authorized and, when issued and sold as contemplated by the Registration Statement and in accordance with the terms of the applicable Plans, will be validly issued, fully paid and non-assessable shares.

        The opinions expressed herein are limited to the General Corporation Law of the State of Delaware (including the statutory provisions and all applicable provisions of the Delaware Constitution and reported judicial decisions interpreting these laws).

        We hereby consent to the reference to our firm under the caption "Legal Matters" in the prospectus included in the Registration Statement, and to the filing of this opinion as an exhibit to the Registration Statement. In giving this 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 promulgated thereunder.

        We do not express an opinion on any matters other than those expressly set forth in this letter. The opinions expressed herein are rendered as of the date hereof. We do not undertake to advise you of matters that may come to our attention subsequent to the date hereof and that may affect the opinions expressed herein, including without limitation, future changes in applicable law. This letter is



our opinion as to certain legal conclusions as specifically set forth herein and is not and should not be deemed to be a representation or opinion as to any factual matters.

Very truly yours,

/s/ HOLME ROBERTS & OWEN LLP

2




QuickLinks