Exhibit 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statements on Form S-3 (Nos. 333-07263, 333-50134, 33-59241, 33-60503, 333-74205, 333-84585, 333-85607, 333-87227, 333-93029, 333-30370 and 333-82334) and the related Prospectuses and in the Registration Statements on Form S-8 (Nos. 333-66171 and 333-39155) pertaining to the Share Option Plan, Restricted Shares Plan, Directors Share Option Plan and Employee Share Purchase Plan of XOMA Ltd. of our report dated February 8, 2002, with respect to the consolidated financial statements of XOMA Ltd. included in this Annual Report (Form 10-K) for the year ended December 31, 2001. /s/ ERNST & YOUNG LLP Palo Alto, California March 28, 2002