<PAGE>

                                                                     Exhibit 5-1

                     SHEPPARD, MULLIN, RICHTER & HAMPTON LLP


                                October 9, 2001


Northrop Grumman Corporation
1840 Century Park East
Los Angeles, California  90067

          Re:  Northrop Grumman Corporation
               ----------------------------
               Registration Statement on Form S-3
               ----------------------------------

Dear Ladies and Gentlemen:

     We have acted as counsel for Northrop Grumman Corporation, a Delaware
corporation (the "Company"), in connection with the registration under the
Securities Act of 1933, as amended (the "Act"), of $2,000,000,000 aggregate
principal amount of the Company's senior and subordinated debt securities
(collectively, the "Debt Securities"); warrants to purchase Debt Securities
("Debt Warrants"); preferred stock, par value $1.00 per share ("Preferred
Stock"); common stock, par value $1.00 per share ("Common Stock"); warrants to
purchase shares of Common Stock, Preferred Stock or other securities ("Equity
Warrants"); stock purchase contracts (the "Stock Purchase Contracts") and stock
purchase units (the "Stock Purchase Units"). The Debt Securities, Debt Warrants,
Preferred Stock, Common Stock, Equity Warrants, Stock Purchase Contracts and
Stock Purchase Units are herein referred to collectively as the "Securities".
The Securities may be issued from time to time by the Company after the
registration statement to which this opinion is an exhibit (the "Registration
Statement") becomes effective. The terms used herein, unless otherwise defined,
have the meanings assigned to them in the Registration Statement.

          We have examined such documents as we have considered necessary for
purposes of this opinion, including (i) the form of Senior Indenture between the
Company and The Chase Manhattan Bank, as trustee (the "Senior Indenture"), (ii)
the form of Subordinated Indenture between the Company and The Chase Manhattan
Bank, as trustee (the "Subordinated Indenture"), (iii) the amended Certificate
of Incorporation and By-Laws of the Company, (iv) the forms of debt warrant
agreement and equity warrant agreement (the "Warrant Agreements"), each between
the Company and one or more warrant agents (each, a "Warrant Agent") relating to
the Debt Warrants of the Equity Warrants, as the case may be, and such other
documents and matters of law as we have deemed necessary in connection with the
opinions hereinafter expressed. In such examination, we have assumed the genuine

<PAGE>

Northrop Grumman Corporation
October 9, 2001
Page 2


ness of all signatures, the authenticity of all documents submitted to us as
originals and the conformity to authentic originals of all documents submitted
to us as certified copies or photocopies. In rendering the opinions expressed
below, we have relied on factual representations by Company officials and
statements of fact contained in the documents we have examined.

          On the basis of the foregoing and having regard for legal
considerations we deem relevant, we are of the opinion that:

          (1) The Company has been duly incorporated and is an existing
corporation in good standing under the laws of the State of Delaware.

          (2) Upon the taking of appropriate corporate action by the Company;
the effectiveness of the Registration Statement under the Act; the qualification
of the Senior Indenture or the Subordinated Indenture, as the case may be, under
the Trust Indenture Act of 1939; the compliance with the "blue sky" laws of
certain states; the due execution and delivery by the parties thereto of (a) the
Senior Indenture and Subordinated Indenture and each amendment of or supplement
thereto, as the case may be (each such Indenture, as so amended or supplemented,
being referred to as an "Indenture", and the Trustee under any Indenture being
referred to as a "Trustee") and (b) a Warrant Agreement relating to Debt
Warrants, and each amendment of or supplement thereto (each such Warrant
Agreement, as so amended or supplemented, being referred to as a "Debt Warrant
Agreement"), assuming that the relevant Indenture and Debt Warrant Agreement are
consistent with the forms thereof filed as exhibits to the Registration
Statement; and the due execution of the Debt Securities and the Debt Warrants on
behalf of the Company, the Debt Securities and the Debt Warrants will be duly
and validly authorized and, when the Debt Securities are duly authenticated by
the relevant Trustee and the Debt Warrants are duly authenticated by the
relevant Warrant Agent and sold and delivered at the price and in accordance
with the terms set forth in the Registration Statement and the supplement or
supplements to the relevant Prospectus included therein, the Debt Securities and
the Debt Warrants will be valid and binding obligations of the Company, entitled
to the benefits of the relevant Indenture and Debt Warrant Agreement, except as
such enforceability may be limited by bankruptcy, insolvency, reorganization,
moratorium or other similar laws affecting creditors' rights generally and
subject to general principles of equity (regardless of whether such
enforceability is considered in a proceeding in equity or at law).

          (3) Upon the taking of appropriate corporate action by the Company and
its shareholders, including the approval of the terms of any class or series of
Securities; the effectiveness of the Registration Statement under the Act; the
due

<PAGE>

Northrop Grumman Corporation
October 9, 2001
Page 3



execution and delivery by the parties thereto of a Warrant Agreement relating to
Equity Warrants, and each amendment thereof or supplement thereto (each such
Warrant Agreement, as so amended or supplemented, being referred to an "Equity
Warrant Agreement"), assuming that the relevant Equity Warrant Agreement is
consistent with the form thereof filed as an exhibit to the Registration
Statement and the due execution of the Equity Warrants on behalf of the Company,
the Equity Warrants will be duly and validly authorized and, when duly
authenticated by the relevant Warrant Agent and sold and delivered at the price
and in accordance with the terms set forth in the Registration Statement and the
supplement or supplements to the relevant Prospectus included therein, the
Common Stock and the Preferred Stock will be validly issued, fully paid and
nonassessable and the Equity Warrants will be valid and binding obligations of
the Company, entitled to the benefits of the Equity Warrant Agreement except as
such enforceability may be limited by bankruptcy, insolvency, reorganization,
moratorium or other similar laws affecting creditors' rights generally and
subject to general principles of equity (regardless of whether such
enforceability is considered in a proceeding in equity or at law).

          (4)  The Stock Purchase Contracts, when (i) the underwriting or
similar agreement relating to the Stock Purchase Contracts has been duly
authorized, executed and delivered by the parties thereto, (ii) the board of
directors of the Company or a duly authorized committee thereof has taken all
necessary corporate action to approve and establish the terms of the Stock
Purchase Contracts and to authorize and approve the issuance thereof and
(iii) the Stock Purchase Contracts have been delivered and paid for by the
purchasers thereof, the Stock Purchase Contracts will constitute valid and
binding obligations of the Company enforceable against the Company in accordance
with their terms, except as such enforceability may be limited by bankruptcy,
insolvency, reorganization, moratorium or other similar laws affecting
creditors' rights generally and subject to general principles of equity
(regardless of whether such enforceability is considered in a proceeding in
equity or at law).

          (5) The Stock Purchase Units, when (i) the underwriting or similar
agreement for the Stock Purchase units has been duly authorized, executed and
delivered by the parties thereof, (ii) the board of directors of the Company or
a duly authorized committee thereof has taken all necessary corporate action to
approve and establish the terms of the Stock Purchase Units and to authorize and
approve the issuance thereof and (iii) the Stock Purchase Units have been
delivered and paid for by the purchasers thereof, the Stock Purchase Units will
be validity issued, fully paid and nonassessable.

          We hereby consent to the filing of this opinion as an exhibit to the
Registration Statement and to the reference to our firm under the caption
"Validity of the Debt and Equity Securities" in the Prospectus.  In giving such
consent, we do not thereby admit that we come within the category of persons
whose consent is required under Section 7 of the Act.

                                     Very truly yours,



                                     /s/ SHEPPARD, MULLIN, RICHTER & HAMPTON LLP


