Exhibit 5.1
November 9, 2021
Amphastar Pharmaceuticals, Inc.
11570 6th Street
Rancho Cucamonga, California 91730
Re: | Registration Statement on Form S-3 |
Ladies and Gentlemen:
At your request, we have examined the Registration Statement on Form S-3 (the “Registration Statement”), filed by Amphastar Pharmaceuticals, Inc., a Delaware corporation (the “Company”), with the Securities and Exchange Commission (the “Commission”) in connection with the registration pursuant to the Securities Act of 1933, as amended (the “Act”), of the Securities (as defined below).
The Registration Statement relates to the proposed issuance and sale by the Company, from time to time, pursuant to Rule 415 under the Act, as set forth in the Registration Statement, the prospectus contained therein (the “Prospectus”) and the supplements to the prospectus referred to therein (each a “Prospectus Supplement”), of up to an aggregate offering price of $250,000,000, or the equivalent thereof, of (a) shares of the Company’s common stock, $0.0001 par value per share (the “Common Stock”); (b) shares of the Company’s preferred stock, $0.0001 par value per share (the “Preferred Stock”); (c) the Company’s debt securities (the “Debt Securities”); (d) depositary shares of the Company representing a fractional interest in a share of Preferred Stock (the “Depositary Shares”); (e) warrants to purchase Common Stock, Preferred Stock, Debt Securities or Depositary Shares (the “Warrants”); (f) subscription rights to purchase Common Stock, Preferred Stock, Debt Securities, Depositary Shares, Warrants or units consisting of some or all of these securities (the “Subscription Rights”); (g) purchase contracts of the Company with respect to the securities of the Company (the “Purchase Contracts”); and (h) units consisting of two or more securities described above in any combination (the “Units”) (the Common Stock, the Preferred Stock, the Debt Securities, the Depositary Shares, the Warrants, the Subscription Rights, the Purchase Contracts and the Units are collectively referred to herein as the “Securities”).
The Securities are to be sold from time to time as set forth in the Registration Statement, the Prospectus contained therein and the Prospectus Supplements. The Debt Securities are to be issued pursuant to a debt securities indenture (the “Indenture”), a form of which has been filed as an exhibit to the Registration Statement and is to be entered into between the Company and a trustee to be named in a Prospectus Supplement to the Registration Statement (the “Trustee”). The Securities are to be sold pursuant to a purchase, underwriting or similar agreement in substantially the form to be filed under a Current Report on Form 8-K. The Debt Securities are to be issued in the form set forth in the Indenture. The Indenture may be supplemented in connection with the issuance of each such series of Debt Securities, by a supplemental indenture or other appropriate action of the Company creating such series of Debt Securities.

Amphastar Pharmaceuticals, Inc.
November 9, 2021
Page 2
We have examined instruments, documents, certificates and records that we have deemed relevant and necessary for the basis of our opinions hereinafter expressed. In such examination, we have assumed: (a) the authenticity of original documents and the genuineness of all signatures; (b) the conformity to the originals of all documents submitted to us as copies; (c) the truth, accuracy and completeness of the information, representations and warranties contained in the instruments, documents, certificates and records we have reviewed; (d) that the Registration Statement, and any amendments thereto (including post-effective amendments), will have become effective under the Act; (e) that a Prospectus Supplement will have been filed with the Commission describing the Securities offered thereby; (f) that the Securities will be issued and sold in compliance with applicable U.S. federal and state securities laws and in the manner stated in the Registration Statement and the applicable Prospectus Supplement; (g) that a definitive purchase, underwriting or similar agreement with respect to any Securities offered will have been duly authorized and validly executed and delivered by the Company and the other parties thereto; (h) that any Securities issuable upon conversion, exchange, redemption or exercise of any Securities being offered will be duly authorized, created and, if appropriate, reserved for issuance upon such conversion, exchange, redemption or exercise; (i) with respect to shares of Common Stock or Preferred Stock, that there will be sufficient shares of Common Stock or Preferred Stock authorized under the Company’s organizational documents that are not otherwise reserved for issuance; and (j) the legal capacity of all natural persons. As to any facts material to the opinions expressed herein that were not independently established or verified, we have relied upon oral or written statements and representations of officers and other representatives of the Company. The term “Board” means the Board of Directors of the Company or a duly constituted and acting committee thereof.
Based on such examination, we are of the opinion that:

Amphastar Pharmaceuticals, Inc.
November 9, 2021
Page 3

Amphastar Pharmaceuticals, Inc.
November 9, 2021
Page 4
Our opinion that any document is legal, valid and binding is qualified as to:
We express no opinion as to the laws of any other jurisdiction, other than the federal laws of the United States of America, the laws of the State of New York as to the enforceability of the Debt Securities and the DGCL.
* * *

Amphastar Pharmaceuticals, Inc.
November 9, 2021
Page 5
We hereby consent to the filing of this opinion as an exhibit to the above-referenced Registration Statement and to the use of our name wherever it appears in the Registration Statement, the Prospectus, any Prospectus Supplement, and in any amendment or supplement thereto. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission thereunder.
Very truly yours, |
WILSON SONSINI GOODRICH & ROSATI |
Professional Corporation |
/s/ Wilson Sonsini Goodrich & Rosati, P.C. |