Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the Registration Statements on Form S-8 (Nos. 333-108306, 333-66171 and 333-39155) pertaining to the XOMA Ltd. 1981 Share Option Plan, the XOMA Ltd. Restricted Share Plan, the XOMA Ltd. Management Incentive Compensation Plan, the XOMA Ltd. 1992 Directors Share Option Plan, the XOMA Ltd. 2002 Director Share Option Plan and the XOMA Ltd. 1998 Employee Share Purchase Plan, and in the Registration Statements on Forms S-3 and S-4 (Nos. 333-112161, 333-107929, 333-07263, 333-60503, 333-130441, 333-130442, and 333-131684) and in the related Prospectuses, respectively of our reports dated March 8, 2007, with respect to the consolidated financial statements of XOMA Ltd., XOMA Ltd. management’s assessment of the effectiveness of internal control over financial reporting and the effectiveness of internal control over financial reporting of XOMA Ltd., included in this Annual Report (Form 10-K) for the year ended December 31, 2006.

/s/ ERNST & YOUNG LLP

Palo Alto, California

March 8, 2007