Exhibit 5.1 February 19, 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 initially filed on February 4, 1999 with the Securities and Exchange Commission (the "Commission") under Registration No. 333-71807 (the "Registration Statement") pursuant to the Securities Act of 1933, as amended (the "Securities Act"), and Rule 415 thereunder for the offering by Corporate Office Properties Trust, a Maryland real estate investment trust (the "Company"), from time to time of its securities (the "Registered Securities"). The Registered Securities consist of (i) common shares of beneficial interest of the Company, par value $.01 per share (the "Common Shares"), (ii) preferred shares of beneficial interest of the Company, par value $.01 per share (the "Preferred Shares"), (iii) warrants to purchase Common Shares (the "Common Share Warrants") or (iv) warrants to purchase Preferred Shares (the "Preferred Share Warrants", and together with the Common Share Warrants, the "Warrants"). The Registration Statement provides that the Company may offer and sell any combination of the Registered Securities in one or more offerings up to a total aggregate initial offering price of $250,000,000. This opinion is being provided at your request in connection with the filing of the Registration Statement. In connection with rendering this opinion, we have examined the Registration Statement and the prospectus (the "Prospectus") which forms a part thereof; 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 Corporate Office Properties Trust February 19, 1999 Page 2 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, without independent verification, upon certificates or telephonic confirmations of public officials and certificates, documents and statements of the Company or representatives or officers thereof. For the purposes of this opinion, we have assumed that: (a) The issuance, sale, amount, and terms of the Registered Securities to be offered from time to time by the Company will be authorized and determined by proper action of its Board of Trustees (or where permitted, a committee of the Board of Trustees) of the Company (each, a "Board Action") in accordance with the Amended and Restated Declaration of Trust and the Bylaws of the Company and applicable law, in each case so as not to result in a default under or breach of any agreement or instrument binding upon the Company and so as to comply with any requirement or restriction imposed by any court or governmental or regulatory body having jurisdiction over the Company, and that at the time of issuance and sale of the Registered Securities the Company will be validly existing and in good standing under the laws of the State of Maryland. (b) Prior to the issuance of any Common Shares or Preferred Shares (including Common Shares that are the subject of any of the Common Share Warrants or Preferred Shares that are the subject of any of the Preferred Share Warrants), there will exist, under the Amended and Restated Declaration of Trust of the Company, the requisite number of authorized but unissued Common Shares or Preferred Shares (and securities of any class into which any of the Preferred Shares may be convertible), as the case may be, and that all actions necessary to the creation of any such Preferred Shares (and securities of any class into which any Preferred Shares may be convertible), whether by amendment to the Amended and Restated Declaration of Trust or by classification or reclassification of existing capital stock and the filing of Articles Supplementary will have been taken, and the terms thereof will conform to the description thereof in the Prospectus or in any supplement thereto (the "Prospectus Supplement"). (c) Appropriate certificates representing the Common Shares or the Preferred Shares will be executed and delivered upon issuance and sale of the Common Shares or the Preferred Shares, as the case may be, and will comply with the Amended and Restated Declaration of Trust and Bylaws of the Company. Corporate Office Properties Trust February 19, 1999 Page 3 (d) Any Warrants will be issued under a valid and legally binding warrant agreement (a "Warrant Agreement") that conforms to the description thereof set forth in the Prospectus Supplement, and will comply with the Amended and Restated Declaration of Trust and Bylaws of the Company and applicable law. (e) To the extent that the obligations of the Company under any Warrant Agreement may be dependent upon such matters, the financial institution to be identified in such Warrant Agreement as warrant agent (the "Warrant Agent") will be duly organized, validly existing, and in good standing under the laws of its jurisdiction of organization; the Warrant Agent will be duly qualified to engage in the activities contemplated by such Warrant Agreement; such Warrant Agreement will have been duly authorized, executed, and delivered by the Warrant Agent and will constitute the legally valid and binding obligation of the Warrant Agent enforceable against the Warrant Agent in accordance with its terms; the Warrant Agent will be in compliance, generally, with respect to acting as Warrant Agent under such Warrant Agreement, with applicable laws and regulations; and the Warrant Agent will have the requisite organizational and legal power and authority to perform its obligations under such Warrant Agreement. (f) The underwriting agreements for offerings of the Securities (each, an "Underwriting Agreement", and collectively, the "Underwriting Agreements") will be valid and legally binding contracts that conform to the description thereof set forth in the applicable Prospectus Supplement. Based upon the foregoing examination and assumptions, we are of the opinion that: 1. Upon due authorization by Board Action of an issuance of Common Shares, and upon issuance and delivery of certificates for such Common Shares against payment therefor in accordance with the terms and provisions of such Board Action, the Registration Statement (as declared effective under the Act), the Prospectus or the applicable Prospectus Supplement and, if applicable, an Underwriting Agreement, or upon issuance and delivery of certificates for Common Shares pursuant to the exercise of one or more Common Share Warrants or the conversion of one or more series of the Preferred Shares convertible into the Common Shares, the Common Shares represented by such certificates will be duly authorized, validly issued, fully paid, and non-assessable. 2. When a series of the Preferred Shares (and securities of any class into which any of the Preferred Shares may be convertible) has been duly authorized and established in accordance with the applicable Board Action, the terms of the Amended and Restated Corporate Office Properties Trust February 19, 1999 Page 4 Declaration of Trust and Bylaws of the Company, and applicable law, and, upon issuance and delivery of certificates for shares of such series of the Preferred Shares against payment therefor in accordance with the terms and provisions of such Board Action, the Registration Statement (as declared effective under the Act), the Prospectus or the applicable Prospectus Supplement, and, if applicable, an Underwriting Agreement, or upon issuance and delivery of certificates for shares of the Preferred Shares pursuant to the exercise of one or more Preferred Share Warrants, the shares of the Preferred Shares represented by such certificates will be duly authorized, validly issued, fully paid, and non-assessable. 3. When the Warrants (and securities of any class for which the Warrants may be exercised) have been duly authorized and established in accordance with the applicable Board Action, the terms of the Amended and Restated Declaration of Trust and the Bylaws of the Company and applicable law, and, upon execution, issuance, and delivery of the Warrants against payment therefor in accordance with the terms and provisions of such Board Action, the Warrant Agreement, the Registration Statement (as declared effective under the Act), the Prospectus or the applicable Prospectus Supplement, and, if applicable, an Underwriting Agreement, the Warrants will constitute valid and legally binding obligations of the Company. 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. 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. This opinion is expressed as of the date hereof and we disclaim any undertaking to advise you of any subsequent changes in the facts stated or assumed herein or of any subsequent changes in applicable law. Very truly yours, /s/ Morgan, Lewis & Bockius LLP