Exhibit 5.1 April 1, 2003 KeySpan Corporation One MetroTech Center Brooklyn, New York 11201-3850 Ladies and Gentlemen: We have acted as counsel to KeySpan Corporation, a New York corporation (the "Company"), in connection with the Registration Statement on Form S-3 (the "462(b) Registration Statement") filed by the Company with the Securities and Exchange Commission (the "Commission") pursuant to Rule 462(b) under the Securities Act of 1933, as amended (the "Act"), in respect of the Company's Registration Statement on Form S-3 (File No. 333-82230) (the "2002 Registration Statement", and together with the 462(b) Registration Statement, the "Registration Statements"), which Rule 462(b) Registration Statement relates to senior debt securities of the Company (the "Senior Debt Securities"). The Senior Debt Securities may be issued and sold or delivered from time to time as set forth in the Registration Statements, any amendments thereto, the prospectus contained therein (the "Prospectus") and supplements to the Prospectus, and pursuant to Rule 415 under the Act, for an aggregate initial offering price not to exceed $25,000,000 plus the initial aggregate offering price of securities remaining available for issuance and sale under the 2002 Registration Statement. The Senior Debt Securities will be issued under an Indenture, dated as of November 1, 2000, between the Company and JPMorgan Chase Bank, as Trustee (the "Senior Trustee"), as supplemented by the First Supplemental Indenture thereto dated March 6, 2002 (the "Senior Indenture"). We have examined the Registration Statements and the Senior Indenture and the form of Senior Debt Securities, which have been filed with the Commission as exhibits to the 2002 Registration Statement. We have also examined the originals, or duplicates or certified or conformed copies, of such records, agreements, instruments and other documents and have made such other and further investigations as we have deemed relevant and necessary in connection with the opinions expressed herein. As to questions of fact material to this opinion, we have relied upon certificates of public officials and of officers and representatives of the Company. In rendering the opinion set forth below, 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 of all documents submitted to us as duplicates or certified or conformed copies, and the authenticity of the originals of such latter documents. We also have assumed that the Senior Indenture is the valid and legally binding obligation of the Senior Trustee. Based upon the foregoing, and subject to the qualifications and limitations stated herein, we are of the opinion that, assuming (a) the taking of all necessary corporate action by the Board of Directors of the Company, a duly constituted and acting committee of such Board or duly authorized officers of the Company (such Board of Directors, committee or authorized officers being referred to herein as the "Board") to approve (1) the issuance and terms of the Senior Debt Securities and (2) the terms of the offering thereof and related matters and (b) the due execution, authentication, issuance and delivery of such Senior Debt Securities, upon payment of the consideration therefor provided for in the applicable definitive purchase, underwriting or similar agreement approved by the Board and otherwise in accordance with the provisions of the Senior Indenture and such agreement, such Senior Debt Securities will constitute valid and legally binding obligations of the Company enforceable against the Company in accordance with their terms. Our opinion set forth above is subject to the effects of (i) bankruptcy, insolvency, fraudulent conveyance, reorganization, moratorium and other similar laws relating to or affecting creditors' rights generally, (ii) general equitable principles (whether considered in a proceeding in equity or at law) and (iii) an implied covenant of good faith and fair dealing. We are members of the Bar of the State of New York, and we do not express any opinion herein concerning any law other than the law of the State of New York and the federal law of the United States. We hereby consent to the filing of this opinion letter as Exhibit 5.1 to the 462(b) Registration Statement and to the use of our name under the caption "Legal Opinions" in the Prospectus incorporated by reference in the 462(b) Registration Statement. Very truly yours, /s/ Simpson Thacher & Bartlett SIMPSON THACHER & BARTLETT