EXHIBIT 5.1 [LETTERHEAD OF MORGAN LEWIS & BOCKIUS LLP] February 4, 1999 Corporate Office Properties Trust 401 City Avenue, Suite 615 Bala Cynwyd, PA 19004 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") of 19,952,397 shares (the "Registered Shares") comprising common shares of beneficial interest, par value $.01 per share (the "Common Shares"), of Corporate Office Properties Trust, a Maryland real estate investment trust (the "Company"). The Registered Shares consist of Common Shares which may be sold from time to time by certain selling shareholders who currently own 7,876,876 Registered Shares and who may acquire the remaining 12,075,521 Registered Shares either by tendering certain units of limited partnership interests ("Units") in Corporate Office Properties, L.P., a Delaware limited partnership, in exchange for Common Shares or by converting Series A Convertible Preferred Shares of the Company (the "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, each as amended to date; such records of corporate 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 certified, photostatic or facsimile copies, the authenticity of the originals of such copies and the authenticity of telephonic confirmation of public officials and others. As to facts material to our opinion, we have relied upon certificates or telephonic confirmations 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 Registered Shares currently owned by the selling shareholders as described above have been legally issued by the Company and are fully paid and non-assessable and that the Registered Shares which may be issued to the selling shareholders in exchange for Units when approved for issuance as provided in the Registration Statement or which may be issued to the selling shareholders by converting Preferred Shares into Common Shares will be legally issued, fully paid and non-assessable when so exchanged or converted. 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 issued between the date hereof and the date on which the Registered Shares are actually issued upon tender of Units or conversion of the Preferred Shares and (c) the amount of such Shares issued upon such exchange or tender will not exceed the total number of Common Shares that the Company is then authorized to issue. 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