Exhibit 5.1 Opinion of Latham & Watkins LLP LATHAM & WATKINS LLP 12636 High Bluff Drive, Suite 300 San Diego, California 92130-2071 Tel: (858) 523-5400 Fax: (858) 523-5450 www.lw.com FIRM / AFFILIATE OFFICES Boston New Jersey Brussels New York Chicago Northern Virginia Frankfurt Orange County Hamburg Paris Hong Kong San Diego London San Francisco Los Angeles Silicon Valley Milan Singapore Moscow Tokyo Washington, D.C. July 2, 2004 Ligand Pharmaceuticals Incorporated 10275 Science Center Drive San Diego, CA 92121 Re: REGISTRATION STATEMENT ON FORM S-8; 750,000 SHARES OF COMMON STOCK, PAR VALUE $0.001 PER SHARE Ladies and Gentlemen: In connection with the registration by Ligand Pharmaceuticals Incorporated, a Delaware corporation (the "Company"), of 750,000 shares of common stock, par value $0.001 per share (the "Shares"), of the Company to be issued pursuant to the Ligand Pharmaceuticals Incorporated 2002 Stock Incentive Plan, as amended (the "Plan"), under the Securities Act of 1933, as amended on a Registration Statement on Form S-8 filed with the Securities and Exchange Commission on July 2, 2004 (the "Registration Statement"), you have requested our opinion set forth below. In our capacity as your special counsel in connection with such registration, we are familiar with the proceedings taken by the Company in connection with the authorization, issuance and sale of the Shares. In addition, we have examined such matters of fact and questions of law as we have considered appropriate for purposes of this letter. In our examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, and the conformity to authentic original documents of all documents submitted to us as copies. We are opining herein as to the effect on the subject transaction only of the General Corporation Law of the State of Delaware, and we express no opinion with respect to the applicability thereto or the effect thereon, of any other laws. Subject to the foregoing, it is our opinion that as of the date hereof the Shares have been duly authorized by all necessary corporate action of the Company, and upon issuance of and payment for the Shares in accordance with the terms set forth in the Plan, the Shares will be validly issued, fully paid and nonassessable. We consent to your filing this opinion as an exhibit to the Registration Statement. Very truly yours, LATHAM & WATKINS LLP