
<PAGE>   1
                                                                   EXHIBIT 5.1

             [Letterhead of Ballard Spahr Andrews & Ingersoll, LLP]


                                  June 24, 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-3,
                        pertaining to 4,000,000 Shares (the "Shares") of common
                        stock of the Company, par value one cent ($0.01) per
                        share ("Common Stock"), issued or to be issued to
                        certain Selling Stockholders (collectively, the "Selling
                        Stockholders")

Ladies and Gentlemen:

        In connection with the registration of the Shares under the Securities
Act of 1933, as amended, by the Company on Form S-3 filed or to be filed with
the Securities and Exchange Commission (the "Commission") on or about June 24,
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 Shares and for purposes of this
opinion we have assumed that such proceedings will be 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 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 Bylaws of the Company as originally adopted by the Board of
Directors of the Company on November 24, 1997, and as amended and restated
pursuant to the Amended and Restated Bylaws of the Company as adopted on March
5, 1999 (the "Bylaws"), resolutions of the Board of Directors of the Company
adopted or a duly authorized Committee thereof on or before the date hereof and
in full force and effect on the



<PAGE>   2



BALLARD SPAHR ANDREWS & INGERSOLL, LLP

AMB Property Corporation
June 24, 1999
Page 2


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 Shares have been issued, nor have
they been or will they be 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
Shares has been duly authorized by all necessary corporate action on the part of
the Company, and the Shares are validly issued, fully paid and non-assessable.

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

