QuickLinks -- Click here to rapidly navigate through this document


EXHIBIT 5.1

March 7, 2012

Rigel Pharmaceuticals, Inc.
1180 Veterans Boulevard
South San Francisco, CA 94080

Ladies and Gentlemen:

        We have acted as counsel to Rigel Pharmaceuticals, Inc., a Delaware corporation (the "Company"), in connection with its filing of a registration statement on Form S-3 (the "Registration Statement") under the Securities Act of 1933, as amended (the "Securities Act"). The Company has provided us with a prospectus (the "Prospectus"), which forms part of the Registration Statement. The Prospectus provides that it will be supplemented in the future by one or more prospectus supplements (each, a "Prospectus Supplement"). The Registration Statement, including the Prospectus as supplemented from time to time by one or more Prospectus Supplements, will provide for the registration by the Company of:

        The Common Stock and the Warrants are collectively referred to herein as the "Securities." The Securities are being registered for offering and sale from time to time pursuant to Rule 415 under the Securities Act. The aggregate public offering price of the Securities being registered will be $200,000,000.

        In connection with this opinion, we have examined and relied upon the originals, or copies certified to our satisfaction, of such records, documents, certificates, opinions, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. As to certain factual matters, we have relied upon certificates of the officers of the Company and have not independently sought to verify such matters.

        In rendering this opinion, we have assumed the genuineness and authenticity of all signatures on original documents; the authenticity of all documents submitted to us as originals; the conformity to originals of all documents submitted to us as copies; the accuracy, completeness and authenticity of certificates of public officials; and the due authorization, execution and delivery of all documents where authorization, execution and delivery are prerequisites to the effectiveness of such documents. With respect to our opinion as to the Common Stock, we have assumed that, at the time of issuance and sale, a sufficient number of shares of Common Stock are authorized and available for issuance and that the consideration for the issuance and sale of the Common Stock is in an amount that is not less than the par value of the Common Stock. We have also assumed that any Warrants offered under the Registration Statement, and the related Warrant Agreement, will be executed in the forms filed as exhibits to the Registration Statement or incorporated by reference therein. We have also assumed that with respect to any Securities being issued upon exercise of any Warrants, the applicable Warrants will be valid and legally binding obligations of the Company, enforceable against the Company in accordance with their terms, except as enforcement may be limited by applicable bankruptcy, insolvency, reorganization, arrangement, moratorium or other similar laws affecting creditors' rights, and subject to general equity principles and to limitations on availability of equitable relief, including specific performance.

        Our opinion herein is expressed solely with respect to the federal laws of the United States, the Delaware General Corporation Law and, as to the Warrants constituting valid and legally binding


obligations of the Company, solely with respect to the laws of the State of New York. Our opinion is based on these laws as in effect on the date hereof. We express no opinion as to whether the laws of any jurisdiction are applicable to the subject matter hereof. We are not rendering any opinion as to compliance with any federal or state law, rule or regulation relating to securities, or to the sale or issuance thereof.

        On the basis of the foregoing and in reliance thereon, and subject to the qualifications herein stated, we are of the opinion that:

        1.     With respect to the Common Stock offered under the Registration Statement, provided that (i) the Registration Statement and any required post-effective amendment thereto have all become effective under the Securities Act and the Prospectus and any and all Prospectus Supplement(s) required by applicable laws have been delivered and filed as required by such laws; (ii) the issuance of the Common Stock has been duly authorized by all necessary corporate action on the part of the Company; (iii) the issuance and sale of the Common Stock do not violate any applicable law, are in conformity with the Company's then operative amended and restated certificate of Incorporation (the "Certificate of Incorporation") and amended and restated bylaws (the "Bylaws"), do not result in a default under or breach of any agreement or instrument binding upon the Company and comply with any applicable requirement or restriction imposed by any court or governmental body having jurisdiction over the Company; and (iv) the certificates for the Common Stock have been duly executed by the Company, countersigned by the transfer agent therefor and duly delivered to the purchasers thereof against payment therefor, then the Common Stock, when issued and sold as contemplated in the Registration Statement, the Prospectus and the related Prospectus Supplement(s) and in accordance with any applicable duly authorized, executed and delivered purchase, underwriting or similar agreement, or upon exercise of any Warrants in accordance with their terms, will be validly issued, fully paid and nonassessable.

        2.     With respect to the Warrants issued under a Warrant Agreement and offered under the Registration Statement, provided that (i) the Registration Statement and any required post-effective amendment thereto have all become effective under the Securities Act and the Prospectus and any and all Prospectus Supplement(s) required by applicable laws have been delivered and filed as required by such laws; (ii) the Warrant Agreement has been duly authorized by the Company and the Warrant Agent by all necessary corporate action; (iii) the Warrant Agreement has been duly executed and delivered by the Company and the Warrant Agent; (iv) the terms of the Warrants and of their issuance and sale have been duly authorized by the Company by all necessary corporate action; (v) the terms of the Warrants and their issuance and sale have been duly established in conformity with the Warrant Agreement and as described in the Registration Statement, the Prospectus and the related Prospectus Supplement(s), so as not to violate any applicable law or result in a default under or breach of any agreement or instrument binding upon the Company, so as to be in conformity with the Certificate of Incorporation and Bylaws, and so as to comply with any requirement or restriction imposed by any court or governmental body having jurisdiction over the Company; and (vi) the Warrants have been duly executed and delivered by the Company and authenticated by the Warrant Agent pursuant to the Warrant Agreement and delivered against payment therefor, then the Warrants, when issued and sold in accordance with the Warrant Agreement and a duly authorized, executed and delivered purchase, underwriting or similar agreement, will be valid and legally binding obligations of the Company, enforceable against the Company in accordance with their terms, except as enforcement thereof may be limited by applicable bankruptcy, insolvency, reorganization, arrangement, moratorium or other similar laws affecting creditors' rights, and subject to general equity principles and to limitations on availability of equitable relief, including specific performance.


        We hereby consent to the 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 which forms part of the Registration Statement. This opinion is expressed as of the date hereof, and we disclaim any undertaking to advise you of any subsequent changes in the facts stated or assumed herein or of any subsequent changes in applicable law.

 
   
   
Sincerely,    

Cooley LLP

 

 

By:

 

/s/ DAVID G. PEINSIPP

David G. Peinsipp

 

 



QuickLinks