<Page>

                                                                    Exhibit 5

                                [SABW LETTERHEAD]






                                   May 27, 2005


Exelon Corporation
10 South Dearborn Street - 37th Floor
Chicago, IL  60680-5379

         Re: Registration of 341,000,000 Shares of Common Stock, no par value

Ladies and Gentlemen:

     We refer to the Registration Statement on Form S-4 (the "Registration
Statement") filed on February 11, 2005, by Exelon Corporation, a Pennsylvania
corporation (the "Company"), with the Securities and Exchange Commission under
the Securities Act of 1933, as amended (the "Securities Act"), relating to the
registration of 341,000,000 shares of common stock, no par value (the
"Registered Shares"), of the Company. The Registered Shares are to be registered
pursuant to the terms of the Agreement and Plan of Merger, dated as of December
20, 2004 (the "Merger Agreement"), between the Company and Public Service
Enterprise Group Incorporated, a New Jersey corporation ("PSEG"), which provides
for the merger (the "Merger") of PSEG with and into the Company, with the
Company surviving. The Registered Shares consist of (i) shares to be issued upon
the effective time of the Merger (the "Closing Shares") and (ii) shares issuable
upon the settlement of the Assumed Stock-Based Awards and Substitute Options
(each as defined in the Merger Agreement) (the "Award Shares").

     We are familiar with the Amended and Restated Articles of Incorporation
of the Company, the resolutions adopted by the Board of Directors of the
Company relating to the Registration Statement and the Merger, the Merger
Agreement and the Registration Statement. We have also examined originals, or
copies of originals certified or otherwise identified to our satisfaction, of
such records of the Company and other corporate documents, have examined such
questions of law and have satisfied ourselves as to such matters of fact as
we have considered relevant and necessary as a basis for the opinion set
forth herein. We have assumed the authenticity of all documents submitted to
us as originals, the genuineness of all signatures and the conformity with the
original documents of any copies thereof submitted to us for our examination.
We have also assumed that each natural person who signed or authorized the
signing of any document or authorized the taking of any action with respect to
any document had the legal capacity to do so (it being understood that this
assumption does not otherwise limit our opinions in paragraphs 1 and 2).
Based on the foregoing, we are of the opinion that:

1.   Each Closing Share will be legally issued, fully paid and non-assessable
     when (i) the Registration Statement, as finally amended, shall have become
     effective under the Securities Act, (ii) the Merger shall have become
     effective under the Pennsylvania Business Corporation Law of 1988, as
     amended, and the New Jersey Business Corporation Act and


SIDLEY AUSTIN BROWN & WOOD LLP IS AN ILLINOIS LIMITED LIABILITY PARTNERSHIP
PRACTICING IN AFFILIATION WITH OTHER SIDLEY AUSTIN BROWN & WOOD PARTNERSHIPS

<Page>

Exelon Corporation
May 27, 2005
Page 2

     (iii) a certificate representing such Closing Share shall have been duly
     executed, countersigned, registered and delivered in accordance with the
     Merger Agreement.

2.   Each Award Share will be legally issued, fully paid and non-assessable when
     (i) the Registration Statement, as finally amended, shall have become
     effective under the Securities Act, (ii) the Merger shall have become
     effective under the Pennsylvania Business Corporation Law of 1988, as
     amended, and the New Jersey Business Corporation Act and (iii) a
     certificate representing such Award Share shall have been duly executed,
     countersigned, registered and delivered against receipt of the agreed
     consideration therefor in accordance with the terms of the related
     Substitute Option or Assumed Stock-Based Award and any applicable agreement
     or plan.

     This opinion letter is limited to the substantive laws of the Commonwealth
of Pennsylvania and the federal laws of the United States of America. We assume
no obligation to supplement this opinion letter if any applicable law changes
after the date hereof or if we become aware of any fact that might change the
foregoing opinions expressed herein after the date hereof.

     We do not find it necessary for the purposes of the opinions expressed in
this letter, and accordingly we do not purport to cover herein, the application
of the securities or "Blue Sky" laws of the various jurisdictions (other than
the federal laws of the United States of America) to the issuance of the
Registered Shares.

     We hereby consent to the filing of this opinion as Exhibit 5 to the
Registration Statement and to all references to our firm under the heading
"Legal Matters" in the Joint Proxy Statement/Prospectus forming a part of the
Registration Statement.



                                          Very truly yours,


                                          /s/ Sidley Austin Brown & Wood LLP