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>0001047579</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>909-980-9484</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Richard Prins</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>10000</noOfUnitsSold>
        <aggregateMarketValue>410680</aggregateMarketValue>
        <noOfUnitsOutstanding>48190000</noOfUnitsOutstanding>
        <approxSaleDate>05/12/2023</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common stock</securitiesClassTitle>
        <acquiredDate>05/12/2023</acquiredDate>
        <natureOfAcquisitionTransaction>Option Exercise</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>10000</amountOfSecuritiesAcquired>
        <paymentDate>05/12/2023</paymentDate>
        <natureOfPayment>Cash</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>05/12/2023</noticeDate>
        <signature>/s/ UBS Financial Services Inc, as attorney-in-fact for Richard Prins</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 2823}]
text: 144
  0001047579
  XXXXXXXX
  LIVE
  0001297184
  AMPHASTAR PHARMACEUTICALS INC
  001-36509
  11570 SIXTH STREET
  RANCHO CUCAMONGA
  CA
  91730
  909-980-9484
  Richard Prins
  Director
  Common stock
  UBS Financial Services Inc
  1000 Harbor Blvd
  3rd Floor
  Weehawken
  NJ
  07086
  10000
  410680
  48190000
  05/12/2023
  NASDAQ
  Common stock
  05/12/2023
  Option Exercise
  Issuer
  N
  10000
  05/12/2023
  Cash
  Y
  05/12/2023
  /s/ UBS Financial Services Inc, as attorney-in-fact for Richard Prins