Exhibit 5 BAKER & BOTTS L.L.P. ONE SHELL PLAZA 910 LOUISIANA HOUSTON, TEXAS 77002-4995 19581.011 August 8, 1996 Aprogenex, Inc. 8000 El Rio Street Houston, Texas 77054-4104 Ladies and Gentlemen: As set forth in a Registration Statement on Form S-3 (the "Registration Statement"), to be filed by Aprogenex, Inc., a Delaware corporation (the "Company"), with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Act"), relating to 3,391,740 shares (the "Shares") of the Company's common stock, par value $.001 per share ("Common Stock"), certain legal matters in connection with the Shares are being passed upon for the Company by us. Certain of the Shares (the Conversion Shares ) are issuable upon (i) the conversion of the aggregate principal amount of $2,005,000 of the Company s Convertible Notes due May 29, 1998 (the Notes ), into shares of Common Stock and (ii) the conversion of accrued interest on the Notes that may accrue through maturity of the Notes into shares of Common Stock. We understand that (a) the Notes were issued to the holders thereof pursuant to Convertible Note Subscription Agreements dated as of May 1, 1996 (the Agreements ), a form of which was incorporated by reference as Exhibit 4.6 to the Registration Statement from Exhibit 4.1(a) to the Company s Form 8-K dated as of June 12, 1996 and (b) the Notes are convertible into shares of Common Stock pursuant to the terms and conditions of the Agreements and the Notes, a form of which was incorporated by reference as Exhibit 4.7 to the Registration Statement from Exhibit 4.1(b) to the Company s Form 8-K dated as of June 12, 1996. We have acted as the Company's counsel in connection with the registration by the Company of the proposed sale of the Shares by certain selling shareholders. In such capacity, we have examined the Company's Amended and Restated Certificate of Incorporation and Bylaws, each as amended to date, and have examined the originals, or copies certified or otherwise identified, of corporate records of the Company, certificates of public officials and of representatives of the Company, statutes and other instruments and documents as a basis for the opinions hereinafter expressed. In giving such opinions, we have relied upon certificates of officers of the Company with respect to the accuracy of the material factual matters contained in such certificates. Aprogenex, Inc. -2- August 8, 1996 On the basis of the foregoing, and subject to the assumptions, limitations and qualifications hereinafter set forth, we are of the opinion that: 1. The Shares have been duly authorized by all necessary corporate action on the part of the Company. 2. If and when issued to holders of Notes upon conversion thereof in accordance with the terms and conditions of the Agreements and the Notes, the Conversion Shares will be validly issued, fully paid and nonassessable. 3. The Shares (other than the Conversion Shares) are validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to us under "Legal Matters" in the prospectus forming a part of the Registration Statement. Very truly yours, /s/ Baker & Botts, L.L.P. GJO; MLW