Exhibit 5.1 [Letterhead of Morgan, Lewis & Bockius LLP] April 30, 2002 Corporate Office Properties Trust 8815 Centre Park Drive Suite 400 Columbia, Maryland 21045 Re: Corporate Office Properties Trust -- Registration Statement on Form S-3 Ladies and Gentlemen: This opinion is furnished in connection with the registration on Form S-3 (the "Registration Statement") pursuant to the Securities Act of 1933, as amended (the "Securities Act"), relating to 13,224,831 of the common shares of beneficial interest, par value $0.01 per share (the "Common Shares"), of Corporate Office Properties Trust, a Maryland real estate investment trust (the "Company"). The Common Shares covered by the Registration Statement are referred to herein as the "Registered Shares." The Registered Shares consist of Common Shares that may be sold from time to time by certain selling shareholders (the "Selling Shareholders") who (i) own outstanding Registered Shares, (ii) may acquire the Registered Shares by tendering certain units of limited partnership interest ("Units") in Corporate Office Properties, L.P., a Delaware limited partnership and a subsidiary of the Company (the "Operating Partnership"), in exchange for Common Shares, or (iii) may acquire Registered Shares by converting the Company's Series D Cumulative Convertible Redeemable Preferred Shares of beneficial interest (the "Series D Preferred Shares") into Common Shares. In connection with rendering this opinion, we have examined the Amended and Restated Declaration of Trust and the Bylaws of the Company; the Operating Partnership's Limited Partnership Agreement, as amended to date (the "Partnership Agreement"); such records of trust proceedings of the Company as we deemed material; and such other certificates, receipts, records and documents as we considered necessary for the purposes of this opinion. In our examination, 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 the original documents of all documents submitted to us as certified, photostatic or facsimile copies, and the authenticity of the originals of such copies. As to facts material to our opinion, we have relied upon certificates of public officials and certificates, documents, statements and other information of the Company or representatives or officers thereof. Based upon the foregoing, in our opinion the outstanding Registered Shares are, the Registered Shares that may be issued to the Selling Shareholders in exchange for Units, when issued in accordance with the terms of the Partnership Agreement, will be, and the Registered Shares that may be issued to the Selling Shareholders upon conversion of the Series D Preferred Shares, when issued in accordance with the terms of the Series D Preferred Shares and the Articles Supplementary of the Company relating to the Series D Preferred Shares, will be, legally issued, fully paid and non-assessable. Corporate Office Properties Trust April 30, 2002 Page 2 The foregoing opinion assumes that all requisite steps have been or will be taken to comply with the requirements of the Securities Act and applicable requirements of state securities laws regulating the offer and sale of securities and that the sum of (a) all Common Shares issued as of the date hereof, (b) any Common Shares, other than Registered Shares, issued between the date hereof and the date on which the last of the Registered Shares are actually issued in exchange for Units or upon conversion of the Series D Preferred Shares, and (c) the number of Common Shares issued upon such exchange or conversion will not exceed the total number of Common Shares that the Company is authorized to issue at the time of such issuance. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to us with respect to this opinion under the heading "Legal Matters" in the prospectus which is a part of such Registration Statement. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act. Very truly yours, /s/ Morgan, Lewis & Bockius LLP