Exhibit 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the 2000 Stock Incentive Plan and Employee Stock Purchase Plan of Discovery Partners International, Inc., of our report dated January 25, 2002, with respect to the consolidated financial statements of Discovery Partners International, Inc. included in the Annual Report (Form 10-K) for the year ended December 31, 2001. ERNST & YOUNG LLP San Diego, California March 27, 2002