
<PAGE>   1

                                                                     EXHIBIT 5.1



                                  May 18, 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 6,750,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 May 18,
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 date hereof (the "Resolutions"), the
Non-Qualified Stock Option Agreement by and between the Company and California
Public Employee's Retirement System, dated March 9,


<PAGE>   2

AMB Property Corporation
May 18, 1999
Page 2



1999 (the "Option"), 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
the Shares been, nor 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 Shares either have been, or in the
case of those Shares issuable upon exercise of the Option, when issued upon
exercise of the Option against payment of the consideration provided for under
the terms thereof (assuming that upon such issuance the total number of shares
issued and outstanding will not exceed the total number of shares the Company is
authorized to issue under its Charter), will be, validly issued, and either are,
or in the case of the Shares issuable upon the issuance of the Option, when
issued as aforesaid, will be, 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
                                ---------------------------------------------
