Exhibit 5.1 November 20, 1997 Board of Directors SunPharm Corporation 4651 Salisbury Road, Suite 205 Jacksonville, Florida 32256 Gentlemen: We have acted as counsel to SunPharm Corporation (the "Company") in connection with the Company's Registration Statement on Form S-3 (the "Registration Statement") relating to the registration under the Securities Act of 1993, as amended (the "Securities Act"), of the offer and sale by the Selling Stockholders identified in the Registration Statement of up to 56,920 shares of the Common Stock, par value $.001 per share ("Common Stock"), of the Company are issuable upon the exercise of certain outstanding options (the "Option Shares") and up to 2,000 shares of Common Stock issuable upon the exercise of certain outstanding warrants ("Warrant Shares"). As the basis for the opinions hereinafter expressed, we have examined such statutes, regulations, corporate records and documents, certificates of corporate and public officials, and other instruments as we have deemed necessary or advisable. In such examination we have assumed the authenticity of all documents submitted to us as originals and the conformity with the original documents of all documents submitted to us as copies. Based on the foregoing and on such legal considerations as we deem relevant, we are of the opinion that the Option Shares and Warrant Shares have been duly and validly authorized, and when issued upon the exercise of such options and warrants in accordance with the terms thereof, will be validly issued, fully paid and nonassessable. We hereby consent to the use of this opinion as an exhibit to the Registration Statement and reference to our firm under the caption "Legal Matters" in the Prospectus included therein. Very truly yours, /s/ ANDREWS & KURTH L.L.P. ----------------------------- Andrews & Kurth L.L.P.