EXHIBIT 5.1 ----------- [LETTERHEAD OF McGUIRE, WOODS, BATTLE & BOOTHE LLP] May 7, 1999 CSX Corporation One James Center 901 East Cary Street Richmond, VA 23219 Ladies and Gentlemen: We have advised CSX Corporation, a Virginia corporation (the "Company"), in connection with (i) the Registration Statement on Form S-3 (File No. 333-68885) (the "Registration Statement") filed by the Company with the Securities and Exchange Commission for the purpose of registering under the Securities Act of 1933, as amended, the Company's Debt Securities, Preferred Stock, Depositary Shares, Common Stock and Securities Warrants (collectively, the "Securities"), from the sale of which the Company may receive proceeds of up to $800,000,000, to be offered from time to time by the Company on terms to be determined at the time of the offering and (ii) the issuance by the Company of up to $400,000,000 aggregate initial offering price of Medium-Term Notes, Series C, due nine months or longer from date of issue ("Notes") as described in the Company's Prospectus, dated January 5, 1999, which is a part of the Registration Statement, and Prospectus Supplement, dated May 7, 1999, and pursuant to an indenture dated as of August 1, 1990 between the Company and The Chase Manhattan Bank, as trustee (the "Trustee"), as supplemented by a First Supplemental Indenture dated as of June 15, 1991, a Second Supplemental Indenture dated as of May 6, 1997 and a Third Supplemental Indenture dated as of April 22, 1998 (the indenture, as so supplemented, is herein called the "Indenture") and the Action of Authorized Pricing Officers adopted as of September 30, 1998 and Action of Authorized Pricing Officers adopted as of May 7, 1999 (the "Actions of Authorized Pricing Officers"), and the solicitation of sales of Notes by the Company pursuant to a Distribution Agreement, dated May 7, 1999 (the "Distribution Agreement"), among the Company and the Agents party thereto. Capitalized terms used and not defined herein shall have the meanings assigned to them in the Registration Statement. We have examined such corporate records, certificates and other documents, and reviewed such questions of law, as we have considered necessary or appropriate for the purpose of this opinion. On the basis of such examination and review, we advise you that, in our opinion, when the terms of a particular Note and the issue and sale thereof have been duly authorized and established in conformity with the Indenture and such Note has been duly completed, executed, authenticated and issued in accordance with the Indenture and the Actions of Authorized Pricing Officers and delivered against payment therefor as contemplated by the Distribution Agreement, such Note will constitute a valid and legally binding obligation of the Company, enforceable against the Company in accordance with its terms, subject to bankruptcy, insolvency, fraudulent transfer, reorganization, moratorium and similar laws of general applicability relating to or affecting creditors' rights and to general equity principles, and except further as enforcement thereof may be limited by (A) requirements that a claim with respect to any Notes denominated other than in U.S. dollars (or a foreign currency or foreign currency unit judgment in respect of such claim) be converted into U.S. dollars at a rate of exchange prevailing on a date determined pursuant to applicable law or (B) governmental authority to limit, delay or prohibit the making of payments in foreign currency or currency units or payments outside the United States. We hereby consent to the filing of this opinion as an exhibit to the Company's Current Report on Form 8-K and the incorporation of this opinion by reference in the Registration Statement and to the references to us under the heading "Validity of the Securities" in the Registration Statement and the heading "Validity of Notes" in the Prospectus Supplement relating to the Notes. We do not admit by giving this consent that we are in the category of persons whose consent is required under Section 7 of the Act. Very truly yours, /s/ McGuire, Woods, Battle & Boothe LLP