EX-5.1 2 a2144496zex-5_1.htm EXHIBIT 5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

Mintz, Levin, Cohn, Ferris, Glovsky and Popeo, P.C.
One Financial Center
Boston, Massachusetts 02111

October 28, 2004

Vertex Pharmaceuticals Incorporated
130 Waverly Street
Cambridge, Massachusetts 02139

Ladies and Gentlemen:

        We have acted as counsel to Vertex Pharmaceuticals Incorporated, a Massachusetts corporation (the "Company"), in connection with the preparation and filing with the Securities and Exchange Commission (the "Commission") of a Registration Statement on Form S-3 (the "Registration Statement"), pursuant to which the Company is registering under the Securities Act of 1933, as amended, (i) $79,313,000 aggregate principal amount of the Company's 53/4% Convertible Senior Subordinated Notes due 2011 (the "Notes") and (ii) such indeterminable number of shares of the Company's common stock, $.01 par value per share, as may be required for issuance upon conversion of the Notes (the "Conversion Shares") for resale to the public. The Notes and Conversion Shares, if and when sold, will be sold by certain security holders of the Company. This opinion is being rendered in connection with the filing of the Registration Statement. All capitalized terms used herein and not otherwise defined shall have the respective meanings given to them in the Registration Statement.

        In connection with this opinion, we have examined the Company's Restated Articles of Organization and By-Laws, both as currently in effect, such other records of the corporate proceedings of the Company and certificates of the Company's officers as we have deemed relevant, and the Registration Statement and the exhibits thereto.

        In our 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, the conformity to original documents of all documents submitted to us as certified, photostatic or facsimile copies and the authenticity of the originals of such copies.

        We express no opinion herein as to the laws of any state or jurisdiction other than the General Laws of the Commonwealth of Massachusetts and the State of New York (including the reported judicial decisions interpreting those laws) and the federal laws of the United States of America. No opinion is expressed herein with respect to the qualification of the Notes and Conversion Shares under the securities or blue sky laws of any state or any foreign jurisdiction.

        Our opinions contained in paragraph (i) below as to enforceability is subject to the further qualification that such enforceability may be (1) limited by bankruptcy, insolvency (including, without limitation, fraudulent conveyances and fraudulent transfers), reorganization, moratorium and other similar laws relating to or affecting creditors' rights generally, (2) limited by general equitable principles, including, without limitation, concepts of materiality, reasonableness, good faith and fair dealing (regardless of whether such enforceability is considered in a proceeding in equity or at law), (3) subject to the effect of any public policy considerations or court decisions which may limit the rights of any person or entity to obtain indemnification, and (4) subject to the effects of generally applicable rules of law that (A) limit or affect the enforcement of provisions that purport to require waiver of the obligations of good faith, fair dealing, diligence and reasonableness or (B) provide that forum selection clauses are not necessarily binding on the court or courts in the forum selected.



        Based upon and subject to the foregoing assumptions, limitations and qualifications, we are of the opinion that:

    (i)
    The Notes have been duly and validly authorized and issued and are binding obligations of the Company; and

    (ii)
    The Conversion Shares have been duly and validly authorized and, when issued upon conversion of the Notes in accordance with the terms of such Notes, will be validly issued, fully paid and non-assessable.

        It is understood that this opinion is to be used only in connection with the offer and sale of the Notes or the Conversion Shares while the Registration Statement is in effect.

        The foregoing opinion is rendered as of the date hereof. We assume no obligation to update such opinion to reflect any facts or circumstances which may hereafter come to our attention or changes in the law which may hereafter occur. We hereby consent to (i) the reference to this firm under the under the caption "Legal Matters" in the Prospectus forming a part of the Registration Statement and (ii) the filing of this opinion as an exhibit to the Registration Statement.

                        Very truly yours,

                        /s/ MINTZ, LEVIN, COHN, FERRIS,
                        GLOVSKY AND POPEO, P.C.

                        MINTZ, LEVIN, COHN, FERRIS,
                        GLOVSKY AND POPEO, P.C.

2




QuickLinks