Exhibit 5.1

        VINSON & ELKINS L.L.P.
2300 FIRST CITY TOWER
1001 FANNIN STREET
HOUSTON, TEXAS 77002-6760
TELEPHONE (713) 758-2222
FAX (713) 758-2346
www.velaw.com

December 19, 2003

Magellan Midstream Partners, L.P.
One Williams Center
Tulsa, Oklahoma 74172

Ladies and Gentlemen:

        We have acted as counsel to Magellan Midstream Partners, L.P., a Delaware limited partnership (the "Partnership"), and Magellan Midstream Holdings, L.P., a Delaware limited partnership and the Partnership's general partner (the "Selling Unitholder"), in connection with the proposed offering and sale by the Partnership of 200,000 common units and by the Selling Unitholder of 4,300,000 common units representing limited partner interests of the Partnership (collectively, the "Common Units"). The underwriters have the option to purchase up to 675,000 additional units to cover over-allotments, if any, from the Selling Unitholder.

        We refer to (a) the registration statement on Form S-3, as amended (Registration No. 333-83952) (the "2002 Registration Statement"), and (b) the registration statement on Form S-3 (Registration No. 333-109732) (the "2003 Registration Statement" and, together with the 2002 Registration Statement, the "Registration Statements"), each as filed by the Partnership with the Securities and Exchange Commission under the Securities Act of 1933, as amended, on May 15, 2002 and October 16, 2003, respectively. A prospectus supplement dated December 18, 2003 (the "Prospectus"), which together with the prospectuses filed with the Registration Statements shall constitute part of the Prospectus, has been filed pursuant to Rule 424(b) promulgated under the Act.

        As the basis for the opinion hereinafter expressed, we examined such statutes, including the Delaware Revised Uniform Limited Partnership 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 assumed the authenticity of all documents submitted to us as originals and the conformity with the original documents of all documents submitted to us as copies.

        Based on the foregoing and on such legal considerations as we deem relevant, we are of the opinion that:

        1.     The Partnership has been duly formed and is validly existing as a limited partnership under the Delaware Revised Uniform Limited Partnership Act.

        2.     The Common Units, when issued and paid for under the Registration Statements, relating to the Common Units, will be duly authorized, validly issued, fully paid and nonassessable.

        We hereby consent to the reference to us under the heading "Legal Matters" in the prospectus forming a part of the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement, but we do not thereby admit that we are within the class of persons whose consent is required under the provisions of the Securities Act or the rules and regulations of the Securities and Exchange Commission issued thereunder.