
<PAGE>   1

                                                                     EXHIBIT 5.1

             [Letterhead of Ballard Spahr Andrews & Ingersoll LLP]


                                  May 19, 1999


AMB Property Corporation
505 Montgomery Street
San Francisco, California 94111


                Re:     AMB Property Corporation, a Maryland corporation (the
                        "Company") - Registration Statement on Form S-8,
                        pertaining to 3,200,000 Shares (the "Plan Shares") of
                        common stock of the Company, par value one cent per
                        share ("Common Stock"), to be issued pursuant to the
                        Second Amended and Restated 1997 Stock Option and
                        Incentive Plan of AMB Property Corporation, AMB
                        Investment Management, Inc. and their Respective
                        Subsidiaries (the "Plan")

Ladies and Gentlemen:

        In connection with the registration of the Plan Shares under the
Securities Act of 1933, as amended, by the Company on Form S-8 filed or to be
filed with the Securities and Exchange Commission (the "Commission") on or about
May 19, 1999 (the "Registration Statement"), you have requested our opinion with
respect to the matters set forth below.

        We have acted as special Maryland corporate counsel to the Company in
connection with the matters described herein. In our capacity as special
Maryland corporate counsel to the Company, we have reviewed and are familiar
with proceedings taken and proposed to be taken by the Company in connection
with the authorization, issuance and sale of the Plan Shares, and for purposes
of this opinion have assumed such proceedings will be timely completed in the
manner presently proposed. In addition, we have relied upon certificates and
advice from the officers of the Company upon which we believe we are justified
in relying and on various certificates from, and documents recorded with, the
State Department of Assessments and Taxation of Maryland (the "SDAT"), including
the charter of the Company, consisting of (i) Articles of Incorporation filed by
the Company with the SDAT on November 24, 1997, (ii) Articles Supplementary,
filed with 



<PAGE>   2

BALLARD SPAHR ANDREWS & INGERSOLL LLP

AMB Property Corporation
May 19, 1999
Page 2


the SDAT on July 23, 1998, (iii) Articles Supplementary, filed with the SDAT on
November 12, 1998, (iv) Articles Supplementary, filed with the SDAT on November
25, 1998, (v) Articles Supplementary filed with the SDAT on May 5, 1999, and
(vi) a Certificate of Correction, filed with the SDAT on March 18, 1999
(correcting the Articles Supplementary filed on July 23, 1998). We have also
examined the Amended and Restated Bylaws of the Company as adopted on March 5,
1999 (the "Bylaws") and resolutions of the Board of Directors of the Company
adopted on or before the date hereof and in full force and effect on the date
hereof (the "Resolutions") and such other laws, records, documents,
certificates, opinions and instruments as we have deemed necessary to render
this opinion.

        We have assumed the genuineness of all signatures, the authenticity of
all documents submitted to us as originals and the conformity to the originals
of all documents submitted to us as certified, photostatic or conformed copies.
In addition, we have assumed that each person executing any instrument, document
or certificate referred to herein on behalf of any party is duly authorized to
do so. We have also assumed that none of the Plan Shares will be issued or
transferred in violation of Section E of Article IV of the Charter entitled
"Restrictions on Ownership and Transfer to Preserve Tax Benefits."

        Based on the foregoing, and subject to the assumptions and
qualifications set forth herein, it is our opinion that the issuance of the Plan
Shares pursuant to the Plan has been duly authorized by the Board of Directors
and, when issued in accordance with the Plan and the Resolutions against payment
in full of the consideration therefor established pursuant to the Plan and the
Resolutions, such Plan Shares will be validly issued, fully paid and
non-assessable (assuming that upon such issuance the total number of Shares of
the Company's Common Stock issued and outstanding will not exceed the number of
Shares of Common Stock that the Company is then authorized to issue under the
Charter).

        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 Plan Shares. We also consent to the
identification of our firm as Maryland counsel to the Company in 



<PAGE>   3




BALLARD SPAHR ANDREWS & INGERSOLL LLP

AMB Property Corporation
May 19, 1999
Page 3

the section of the Prospectus (which is part of the Registration Statement)
entitled "Legal Matters".

        The opinions expressed herein are limited to the laws of the State of
Maryland and we express no opinion concerning any laws other than the laws of
the State of Maryland. Furthermore, the opinions presented in this letter are
limited to the matters specifically set forth herein and no other opinion shall
be inferred beyond the matters expressly stated.


                                      Very truly yours,

                                      /s/ Ballard Spahr Andrews & Ingersoll LLP



