Exhibit 5.1

Michael Tenta
+1 650 843 5636
mtenta@cooley.com
December 18, 2018
XOMA Corporation
2200 Powell St Suite 310
Emeryville, CA 94608
Ladies and Gentlemen:
You have requested our opinion, as counsel to XOMA Corporation, a Delaware corporation (the “Company”), with respect to certain matters in connection with the offering by the Company of the $30,000,000 of the Company’s common stock, par value $0.0075 (the “Shares”), pursuant to a Registration Statement on FormS-3 (No.333-223493) (the“Registration Statement”), filed with the Securities and Exchange Commission (the“Commission”) under the Securities Act of 1933, as amended (the “Act”), the prospectus included within the Registration Statement (the “Base Prospectus”), and the prospectus supplement dated December 18, 2018, filed with the Commission pursuant to Rule 424(b) of the Rules and Regulations of the Act (together with the Base Prospectus, the “Prospectus.”). The Shares are to be sold by the Company in accordance with a Sales Agreement, dated December 18, 2018, between the Company and H.C. Wainwright & Co., LLC (the “Agreement”), as described in the Prospectus.
In connection with this opinion, we have examined and relied upon the Registration Statement and the Prospectus, the Agreement, the Company’s Certificate of Incorporation, as amended, itsBy-laws, and the originals or copies certified to our satisfaction of such records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. In rendering this opinion, we have assumed the genuineness and authenticity of all signatures on original documents; the genuineness and authenticity of all documents submitted to us as originals; the conformity to originals of all documents submitted to us as copies; and the accuracy, completeness and authenticity of certificates of public officials.
We have assumed (i) that each sale of Shares will be duly authorized by the Board of Directors of the Company, a duly authorized committee thereof or a person or body pursuant to an authorization granted in accordance with Section 152 of the General Corporation Law of the State of Delaware (the “DGCL”), (ii) that no more than 3,000,000 Shares will be sold under the Agreement and (iii) that the price at which the Shares are sold will equal or exceed the par value of the Shares. We express no opinion to the extent that future issuances of securities of the Company and/or anti-dilution adjustments to outstanding securities of the Company cause the number of shares of the Company’s common stock outstanding or issuable upon conversion or exercise of outstanding securities of the Company to exceed the number of Shares then issuable under the Agreement.
Cooley LLP 3175 Hanover Street, Palo Alto, CA 94304