<Page>

                                                                     EXHIBIT 5.1

                    [LETTERHEAD OF SULLIVAN & WORCESTER LLP]


February 10, 2005


Hospitality Properties Trust
400 Centre Street
Newton, Massachusetts 02458

     Re:   Hospitality Properties Trust
           $300,000,000 5.125% Senior Notes due February 15, 2015
           ------------------------------------------------------

Ladies and Gentlemen:

     We have acted as counsel to Hospitality Properties Trust, a Maryland real
estate investment trust (the "Company"), in connection with the Company's
authorization for issuance and sale of an aggregate of $300,000,000 in principal
amount of the Company's 5 1/8% Senior Notes due February 15, 2015 (the "Senior
Notes"), to be issued pursuant to the Indenture, dated as of February 25, 1998
(the "Base Indenture"), between the Company and U.S. Bank National Association,
as successor trustee to State Street Bank and Trust Company, as Trustee (the
"Trustee"), to be supplemented by Supplemental Indenture No. 8, to be dated on
or about February 15, 2005 (in the form provided to us by the Company, the
"Supplemental Indenture"), between the Company and the Trustee (the Base
Indenture, as so supplemented, the "Indenture"). We understand that the Senior
Notes are to be offered and sold under the Company's Registration Statement on
Form S-3, No. 333-43573, as amended, and/or the Company's Registration Statement
on Form S-3, No. 333-84064, as amended (collectively, the "Registration
Statement").

     In connection with this opinion, we have examined and relied upon copies of
(i) the Registration Statement, (ii) the final Prospectus dated March 20, 2002
(the "Base Prospectus") relating to the Registration Statement, (iii) the final
Prospectus Supplement to the Base Prospectus dated February 10, 2005 relating to
the Senior Notes (the "Prospectus Supplement" and the Base Prospectus, as
supplemented thereby, the "Prospectus"), (iv) the Indenture, and (iv)
resolutions adopted by the Board of Trustees of the Company on February 9, 2005
and resolutions adopted by an Ad Hoc Pricing Committee of the Board of Trustees
of the Company on February 10, 2005, each relating to the Senior Notes. We have
also examined and relied upon originals or copies of such records, agreements
and instruments of the Company, certificates of public officials and of officers
of the Company and such other documents and records, and such matters of law, as
we have deemed necessary as a basis for the opinions hereinafter expressed. In
making such examination, we have assumed the genuineness of all signatures, the
legal capacity of natural persons, the authenticity of all documents submitted
to us as originals and the conformity to the originals of all documents
submitted to us as copies, which facts we have not independently verified.

     We have assumed for purposes of this opinion that the Trustee is duly
organized, validly existing and in good standing under the laws of its
jurisdiction of organization, and is duly qualified to engage in the activities
contemplated by, and has the requisite organizational and legal power and
authority to perform its obligations under, the

<Page>

Hospitality Properties Trust
February 10, 2005
Page 2

Indenture, that the Trustee is in compliance with all applicable laws and
regulations, and that the Indenture is and will be the valid and binding
agreement of the Trustee, enforceable against the Trustee in accordance with its
terms.

     We express no opinion herein as to any laws other than the laws of the
Commonwealth of Massachusetts and the federal laws of the United States. Insofar
as this opinion involves matters of Maryland law we have, with the Company's
permission, relied solely upon the opinion of even date herewith of Venable LLP,
a copy of which we understand the Company is filing as Exhibit 5.2 to its
Current Report on Form 8-K, to be dated February 11, 2005 (the "Current
Report"), and with respect to matters involving Maryland law our opinion is
subject to the limitations and qualifications set forth in such opinion.

     Our opinion set forth below with respect to the validity or binding effect
of the Senior Notes or any obligations is subject to (i) limitations arising
under applicable bankruptcy, insolvency, reorganization, fraudulent transfer
moratorium or other similar laws affecting the enforcement generally of the
rights and remedies of creditors and secured parties or the obligations of
debtors, (ii) general principles of equity (regardless of whether considered in
a proceeding at law or in equity), including, without limitation, the discretion
of any court of competent jurisdiction in granting specific performance or
injunctive or other equitable relief, and (iii) an implied duty on the part of
the party seeking to enforce rights or remedies to take action and make
determinations on a reasonable basis and in good faith to the extent required by
applicable law.

     Based on and subject to the foregoing, we are of the opinion that, as of
the date hereof, the Senior Notes have been duly authorized and, when (i) the
Supplemental Indenture shall have been duly executed and delivered by the
parties thereto and (ii) the Senior Notes have been (A) duly executed and
delivered by the Company and authenticated by the Trustee as provided in the
Indenture, and (B) duly delivered to the purchasers thereof against payment of
the agreed consideration therefor, as provided in the Registration Statement,
the Prospectus and the Indenture, will constitute validly issued and binding
obligations of the Company.

     The opinions set forth herein are rendered as of the date hereof, and we
assume no obligation to update such opinions to reflect any facts or
circumstances which may hereafter come to our attention or any changes in the
law which may hereafter occur. We hereby consent to the filing of this opinion
as Exhibit 5.1 to the Current Report, which is incorporated by reference into
the Registration Statement and the Prospectus, and to references to this firm
under the caption "Validity of the Offered Securities" in the Base Prospectus
and "Legal Matters" in the Prospectus Supplement. 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 Securities Act of 1933, as amended.

Very truly yours,

/s/ SULLIVAN & WORCESTER LLP

SULLIVAN & WORCESTER LLP
