
<PAGE>   1
                                                                       EXHIBIT 5


               [LETTERHEAD OF SHAW, PITTMAN, POTTS & TROWBRIDGE]

                                April 8, 1997


Commercial Net Lease Realty, Inc.
400 East South Street
Suite 500
Orlando, Florida  32801

      RE:      COMMERCIAL NET LEASE REALTY, INC.

Ladies and Gentleman:

      We have acted as counsel to Commercial Net Lease Realty, Inc., a Maryland
corporation (the "Company"), in connection with the Registration Statement on
Form S-3 filed by the Company on July 20, 1995, with the Securities and
Exchange Commission under the Securities Act of 1933, as amended to date (the
"Registration Statement"), relating to the offering by the Company from time to
time of (i) one or more series of debt securities (the "Debt Securities"), (ii)
shares of common stock, par value $.01 per share (the "Common Stock"), and
(iii) warrants to purchase Common Stock (the "Common Stock Warrants"), with an
aggregate initial public offering price of up to $300,000,000.   The Debt
Securities, Common Stock and Common Stock Warrants are collectively referred to
herein as the "Offered Securities."

      In our capacity as counsel in connection with such registration, we are
familiar with the proceedings taken and proposed to be taken by the Company in
connection with the authorization and issuance of the Offered Securities, and
for purpose of this opinion have assumed that such proceedings will be timely
completed in the manner presently proposed.  In addition, we have made such
legal and factual examinations and inquiries, including an examination of
originals or copies, certified or otherwise identified to our satisfaction, of
such documents, corporate records and instruments as we have deemed necessary
or appropriate for purposes of this opinion.  Among such documents are the
Registration Statement, the charter of the Company certified as of a recent
date by the State Department of Assessments and Taxation of Maryland (the
"Charter"), the by-laws of the Company, Resolutions adopted by the Board of
Directors of the Company (the "Board of Directors") in connection with the
matters contemplated by the Registration Statement, and the form of Indenture
(the "Indenture") to be entered into between the Company and a financial
institution organized under the laws of the United States of America (the
"Trustee").

      The Debt Securities will be issued pursuant to the Indenture and the
Common Stock Warrants will be issued under one or more warrant agreements
(each, a "Warrant Agreement"), each to be between the Company and a financial
institution identified therein as warrant agent (each, a "Warrant Agent").

      Subject to the foregoing and the other matters set forth herein, it is
our opinion, that, as of the date hereof:

      1. The issuance of the Debt Securities by the Company has been duly
authorized by the Board of Directors and, (i) when the Debt Securities have
been duly established by the Indenture (including, without limitation, the
<PAGE>   2
Commercial Net Lease Realty, Inc.
April 8, 1997
Page 2

adoption by the Board of Directors of a resolution duly authorizing the
issuance and delivery of the Debt Securities), (ii) when the Debt Securities
have been duly authenticated by the Trustee and (iii) when the Debt Securities
have been duly executed and delivered on behalf of the Company against payment
therefor in accordance with the terms and provisions of the Indenture and as
contemplated by the Registration Statement and the applicable Prospectus
Supplement, the Debt Securities will constitute legally valid and binding
obligations of the Company, enforceable against the Company in accordance with
their terms.

      2. The Company has the authority, pursuant to its Charter, to issue up to
50,000,000 shares of Common Stock.  Upon adoption by the Board of Directors of
a resolution in form and content as required by applicable law, and upon
issuance and delivery of and payment for such shares in the manner contemplated
by the Registration Statement and the applicable Prospectus Supplement and by
such resolution, such shares of Common Stock will be validly issued, fully paid
and nonassessable.

      3. The issuance of the Common Stock Warrants by the Company has been duly
authorized by the Board of Directors and, (i) when the final terms of the
Common Stock Warrants and applicable Warrant Agreement have been duly
established in accordance with the Charter and applicable law, (ii) upon the
adoption by the Board of Directors of a resolution duly authorizing the
issuance and delivery of the Common Stock Warrants and (iii) when duly executed
and delivered by the Company against payment therefor and countersigned by the
applicable Warrant Agent in accordance with the applicable Warrant Agreement
and delivered to and paid for by the purchasers of the Common Stock Warrants in
the manner contemplated by the Registration Statement and the applicable
Prospectus Supplement, the Common Stock Warrants will constitute legally valid
and binding obligations of the Company, enforceable against the Company in
accordance with their terms.

      We consent to your filing of this opinion as an exhibit to the
Registration Statement and to the reference to our firm under the caption
"Legal Matters" in the prospectus included therein.

                                         Very truly yours,
                                              
                                         /s/ Shaw, Pittman, Potts & Trowbridge
                                              
                                         Shaw, Pittman, Potts & Trowbridge





