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


Exhibit 5.1

LOGO

November 13, 2007

MarkWest Energy Partners, L.P.
1515 Araphoe Street
Tower 2, Suite 700
Denver, Colorado 80202

Re:
Registration Statement on Form S-4

Ladies and Gentlemen:

        We have acted as counsel to MarkWest Energy Partners, L.P., a Delaware limited partnership ("Energy Partners"), in connection with the partnership proceedings taken and to be taken relating to the merger of MWEP, L.L.C., a Delaware limited liability company and wholly owned subsidiary of Energy Partners ("Merger Sub"), with and into MarkWest Hydrocarbon, Inc., a Delaware corporation ("Hydrocarbon"), with Hydrocarbon being the surviving entity and a direct and wholly owned subsidiary of Energy Partners (the "Merger"), and the conversion of each of the common shares of Hydrocarbon issued and outstanding at the effective time of the Merger (other than treasury shares, shares held by Energy Partners or its subsidiaries and, to the fullest extent permitted by law, shares of dissenting holders and Hydrocarbon restricted stock) into 1.285 common units of Energy Partners (the "Common Units") pursuant to the Agreement and Plan of Redemption and Merger dated as of September 5, 2007 among Energy Partners, Merger Sub and Hydrocarbon (the "Redemption and Merger Agreement"). We have also participated in the preparation and filing with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Securities Act"), of a registration statement on Form S-4 relating to the Merger (the "Registration Statement").

        As the basis for the opinion hereinafter expressed, we examined such statutes, including the Delaware Revised Uniform Limited Partnership Act (the "Delaware Act"), corporate records and documents, certificates of corporate and public officials and other instruments and documents as we deemed necessary or advisable for the purposes of this opinion. In such examination, we have assumed the genuineness of all signatures, the legal capacity of natural persons, the authenticity of all documents submitted to us as originals, the conformity to original documents submitted to us as certified or photostatic copies, that the Registration Statement, and any amendments thereto (including post-effective amendments), will have become effective and that the Common Units will have been issued and sold in compliance with applicable federal and state securities laws and in the manner described in the Registration Statement.

        We are rendering this opinion as of the time the Registration Statement becomes effective in accordance with Section 8(a) of the Securities Act.

Vinson & Elkins LLP Attorneys at Law
Austin Beijing Dallas Dubai Hong Kong Houston
London Moscow New York Shanghai Tokyo Washington
  666 Fifth Avenue, 26th Floor
New York, NY 10103-0040
Tel 212.237.0000  Fax 212.237.0100  www.velaw.com

LOGO

        Based on the foregoing, and subject to the assumptions, limitations and qualifications set forth herein, it is our opinion that the Common Units have been duly and validly authorized by all necessary action on the part of Energy Partners and, when issued pursuant to the terms of the Redemption and Merger Agreement, will be validly issued, fully paid and non-assessable (except as such nonassessability may be affected by Section 17-303 and 17-607 of the Delaware Act) by Energy Partners.

        We express no opinions concerning (i) the validity or enforceability of any provisions contained in the Redemption and Merger Agreement or the Common Units that purport to waive or not give effect to rights to notices, defenses, subrogation or other rights or benefits that cannot be effectively waived or rendered ineffective under applicable law or (ii) the enforceability of indemnification or contribution provisions to the extent they purport to relate to liabilities resulting from or based upon negligence or any violation of federal or state securities or blue sky laws.

        The opinion expressed herein is limited exclusively to the federal laws of the United States of America and the Delaware Act and the Constitution of the State of Delaware, each as interpreted by the courts of the State of Delaware, and we are expressing no opinion as to the effect of the laws of any other jurisdiction.

        We hereby consent to the references to this firm under the caption "Legal Matters" in the joint proxy statement/prospectus forming part of this Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. By giving this 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