content: <?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/ownership" xmlns:com="http://www.sec.gov/edgar/common">
    <headerData>
      <submissionType>144</submissionType>
      <filerInfo>
        <filer>
          <filerCredentials>
            <cik>0001611286</cik>
            <ccc>XXXXXXXX</ccc>
          </filerCredentials>
        </filer>
        <liveTestFlag>LIVE</liveTestFlag>
  
  
  
      </filerInfo>
    </headerData>
    <formData>
      <issuerInfo>
        <issuerCik>0001297184</issuerCik>
        <issuerName>Amphastar Pharmaceuticals, Inc.</issuerName>
        <secFileNumber>001-36509</secFileNumber>
        <issuerAddress>
          <com:street1>11570 Sixth Street</com:street1>
          <com:city>Rancho Cucamonga</com:city>
          <com:stateOrCountry>CA</com:stateOrCountry>
          <com:zipCode>91730</com:zipCode>
        </issuerAddress>
        <issuerContactPhone>9099809484</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Floyd Petersen</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Director</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common stock</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>UBS Financial Services Inc</name>
          <address>
            <com:street1>1000 Harbor Blvd</com:street1>
            <com:street2>3rd Floor</com:street2>
            <com:city>Weehawken</com:city>
            <com:stateOrCountry>NJ</com:stateOrCountry>
            <com:zipCode>07086</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>5000</noOfUnitsSold>
        <aggregateMarketValue>208400</aggregateMarketValue>
        <noOfUnitsOutstanding>48190000</noOfUnitsOutstanding>
        <approxSaleDate>05/17/2023</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common stock</securitiesClassTitle>
        <acquiredDate>06/08/2021</acquiredDate>
        <natureOfAcquisitionTransaction>RSU Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>5000</amountOfSecuritiesAcquired>
        <paymentDate>06/08/2021</paymentDate>
        <natureOfPayment>NA</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>N</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <securitiesSoldInPast3Months>
        <sellerDetails>
          <name>Floyd Petersen</name>
          <address>
            <com:street1>25589 State St</com:street1>
            <com:city>Loma Linda</com:city>
            <com:stateOrCountry>CA</com:stateOrCountry>
            <com:zipCode>92354</com:zipCode>
          </address>
        </sellerDetails>
        <securitiesClassTitle>Common stock</securitiesClassTitle>
        <saleDate>04/03/2023</saleDate>
        <amountOfSecuritiesSold>491</amountOfSecuritiesSold>
        <grossProceeds>18518</grossProceeds>
      </securitiesSoldInPast3Months>
      <securitiesSoldInPast3Months>
        <sellerDetails>
          <name>Floyd Petersen</name>
          <address>
            <com:street1>25589 State St</com:street1>
            <com:city>Loma Linda</com:city>
            <com:stateOrCountry>CA</com:stateOrCountry>
            <com:zipCode>92354</com:zipCode>
          </address>
        </sellerDetails>
        <securitiesClassTitle>Common stock</securitiesClassTitle>
        <saleDate>03/01/2023</saleDate>
        <amountOfSecuritiesSold>500</amountOfSecuritiesSold>
        <grossProceeds>18349</grossProceeds>
      </securitiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>05/17/2023</noticeDate>
        <signature>/s/ UBS Financial Services Inc, as attorney-in-fact for Floyd Petersen</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 3981}]
text: 144
  0001611286
  XXXXXXXX
  LIVE
  0001297184
  Amphastar Pharmaceuticals, Inc.
  001-36509
  11570 Sixth Street
  Rancho Cucamonga
  CA
  91730
  9099809484
  Floyd Petersen
  Director
  Common stock
  UBS Financial Services Inc
  1000 Harbor Blvd
  3rd Floor
  Weehawken
  NJ
  07086
  5000
  208400
  48190000
  05/17/2023
  NASDAQ
  Common stock
  06/08/2021
  RSU Vesting
  Issuer
  N
  5000
  06/08/2021
  NA
  N
  Floyd Petersen
  25589 State St
  Loma Linda
  CA
  92354
  Common stock
  04/03/2023
  491
  18518
  Floyd Petersen
  25589 State St
  Loma Linda
  CA
  92354
  Common stock
  03/01/2023
  500
  18349
  05/17/2023
  /s/ UBS Financial Services Inc, as attorney-in-fact for Floyd Petersen