QuickLinks -- Click here to rapidly navigate through this document

Exhibit 5.1


[LETTERHEAD OF BALLARD SPAHR ANDREWS & INGERSOLL, LLP]

June 30, 2004

Mack-Cali Realty Corporation
11 Commerce Drive
Cranford, New Jersey 07016

Ladies and Gentlemen:

        We have acted as Maryland corporate counsel to the Company in connection with the registration of shares of Common Stock, shares of Preferred Stock, Depositary Shares and Warrants (each a "Security" and collectively, the "Securities") under the Securities Act of 1933, as amended (the "Act"), by the Company pursuant to Post-Effective Amendment No. 1 to the Registration Statement on Form S-3 (Reg. No. 222-44433) filed or to be filed with the Securities and Exchange Commission (the "Commission") on or about June 30, 2004 (the "Amendment Registration Statement"). You have requested our opinion with respect to the matters set forth below.

        In our capacity as Maryland corporate counsel to the Company and for the purposes of this opinion, we have examined originals, or copies certified or otherwise identified to our satisfaction, of the following documents (collectively, the "Documents"):


        In reaching the opinions set forth below, we have assumed the following:


        Based on our review of the foregoing and subject to the assumptions and qualifications set forth herein, it is our opinion that, as of the date of this letter:


        The foregoing opinion is limited to the substantive laws of the State of Maryland, and we do not express any opinion herein concerning any other law. We express no opinion as to the applicability or effect of any federal or state securities laws, including the securities laws of the State of Maryland, or as to federal or state laws regarding fraudulent transfers. To the extent that any matter as to which our opinion is expressed herein would be governed by any jurisdiction other than the State of Maryland, we do not express any opinion on such matter.

        This opinion letter is issued as of the date hereof and is necessarily limited to laws now in effect and facts and circumstances presently existing and brought to our attention. We assume no obligation to supplement this opinion letter if any applicable laws change after the date hereof, or if we become aware of any facts or circumstances that now exist or that occur or arise in the future and may change the opinions expressed herein after the date hereof.

        We consent to your filing this opinion as an exhibit to the Registration Statement and further consent to the filing of this opinion as an exhibit to the applications to securities commissioners for the various states of the United States for registration of the Securities. We also consent to the identification of our firm as Maryland counsel to the Company in the section of the Registration Statement entitled "Legal Matters." In giving this consent, we do not admit that we are within the category of persons whose consent is required by Section 7 of the Act.

    Very truly yours,

 

 

BALLARD SPAHR ANDREWS & INGERSOLL, LLP



QuickLinks

[LETTERHEAD OF BALLARD SPAHR ANDREWS & INGERSOLL, LLP]