Exhibit 10.40

AMENDMENT NO. 1 TO  SECOND AMENDED AND RESTATED LIMITED LIABILITY COMPANY  AGREEMENT OF MARKWEST LIBERTY MIDSTREAM & RESOURCES, L.L.C.

This AMENDMENT NO. 1 TO SECOND AMENDED AND RESTATED LIMITED LIABILITY COMPANY AGREEMENT (the
"Amendment") of MarkWest Liberty Midstream & Resources, L.L.C. (the "Company") is dated as of
November 20, 2009 among MarkWest Liberty Gas Gathering, L.L.C., a Delaware limited liability company ("MWE Liberty"), M&R MWE
Liberty, LLC, a Delaware limited liability company ("NGPMR"), and the Company.

RECITALS

A.    MWE
Liberty and NGPMR constitute all of the Members of the Company and are parties to that certain Second Amended and Restated Limited Liability Company Agreement of the
Company dated as of November 1, 2009 (as amended or restated, the "Agreement").

B.    NGPMR
holds all of the Class A Interests and is the sole Class A Member of the Company and MWE Liberty holds all of the Class B Interests and is the
sole Class B Member of the Company.

C.    Pursuant
to Section 15.9 of the Agreement, MWE Liberty, NGPMR and the Company desire to amend the Agreement to modify the period of time in which the Members must
contribute capital to the Company after a Capital Call has been issued pursuant to the Agreement in the manner set forth in this Amendment.

C.    Capitalized
terms used but not defined in this Amendment shall have the meaning ascribed to them in the Agreement.

AGREEMENT

NOW THEREFORE, in consideration of the premises and the mutual covenants and agreements contained herein, and other good and valuable
consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereby agree as follows:

1.     Section 4.1(b)(i)
of the Agreement is hereby amended by deleting the third sentence thereof in its entirety and replacing it with the following:



2.     Section 4.1(b)(ii)
of the Agreement is hereby amended by deleting the second sentence thereof in its entirety and replacing it with the following:



3.     Section 4.1(c)(i)
of the Agreement is hereby amended by deleting the last sentence thereof in its entirety and replacing it with the following:



---



4.     Section 4.1(d)(i)
of the Agreement is hereby amended by deleting the last sentence thereof in its entirety and replacing it with the following:



5.     Section 4.1(d)(ii)
of the Agreement is hereby amended by deleting the last sentence thereof in its entirety and replacing it with the following:



6.     Except
as expressly modified by this Amendment, all terms of the Agreement remain in full force and effect. In the event of a conflict between this Amendment and the
Agreement, the terms of this Amendment shall control.

7.     This
Amendment may be executed in any number of counterparts, and each of such counterparts shall together constitute but one and the same Amendment. Executed
counterparts may be delivered by facsimile or PDF and shall be considered an original.

[signature page follows]

---



IN
WITNESS WHEREOF, the parties hereto have executed this Amendment No. 1 to the Second Amended and Restated Limited Liability Company Agreement of MarkWest Liberty
Midstream & Resources, L.L.C. as of the date first above written.

MARKWEST LIBERTY GAS GATHERING, L.L.C.By:

/s/ Frank M. SempleName:

Frank M. SempleTitle:

President and CEOMARKWEST LIBERTY MIDSTREAM & RESOURCES, L.L.C.By:

/s/ Frank M. SempleName:

Frank M. SempleTitle:

President and CEOM&R MWE LIBERTY, LLCBy:

/s/ John T. RaymondName:

John T. RaymondTitle:

Managing Partner & CEO


---



QuickLinks