<?xml version="1.0" encoding="US-ASCII"?>
<!-- DFIN New ActiveDisclosure (SM) XBRL Linkbase Document - http://www.dfinsolutions.com/ -->
<!-- Creation Date :2023-05-11T12:32:56.7438+00:00 -->
<!-- Copyright (c) 2023 Donnelly Financial Solutions, Inc. All Rights Reserved. -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfStockholdersEquityDeficitUnaudited" xlink:href="hrtx-20230331.xsd#Role_StatementCondensedConsolidatedStatementsOfStockholdersEquityDeficitUnaudited" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureBusinessAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureBusinessAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesPercentageOfNetProductSalesAndAccountsReceivableBalanceDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureAccountingPoliciesPercentageOfNetProductSalesAndAccountsReceivableBalanceDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesSummaryOfDisaggregatedNetProductSalesDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureAccountingPoliciesSummaryOfDisaggregatedNetProductSalesDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesSummaryOfActivityToProductReturnsDistributorFeesAndDiscountsRebatesAndAdministrativeFeesDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureAccountingPoliciesSummaryOfActivityToProductReturnsDistributorFeesAndDiscountsRebatesAndAdministrativeFeesDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesCommonStockEquivalentsExcludedFromComputationOfNetLossPerShareDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureAccountingPoliciesCommonStockEquivalentsExcludedFromComputationOfNetLossPerShareDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureAccountingPoliciesAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureFairValueMeasurementsScheduleOfFinancialAssetsMeasuredOnRecurringBasisDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureFairValueMeasurementsScheduleOfFinancialAssetsMeasuredOnRecurringBasisDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureShortTermInvestmentsSummaryOfShortTermInvestmentsDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureShortTermInvestmentsSummaryOfShortTermInvestmentsDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureInventoryAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureInventoryAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureLeasesAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureLeasesAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureReorganizationsAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureReorganizationsAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureConvertibleNotesAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureConvertibleNotesAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureStockholdersEquityAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureStockholdersEquityAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfRestrictedStockUnitActivityDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureEquityIncentivePlanSummaryOfRestrictedStockUnitActivityDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfStockBasedCompensationExpenseRelatedToStockBasedPaymentAwardsGrantedDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureEquityIncentivePlanSummaryOfStockBasedCompensationExpenseRelatedToStockBasedPaymentAwardsGrantedDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureEquityIncentivePlanAdditionalInformationDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfFairValueOfOptionGrantOnGrantDateUsingBlackScholesOptionPricingModelDetails" xlink:href="hrtx-20230331.xsd#Role_DisclosureEquityIncentivePlanSummaryOfFairValueOfOptionGrantOnGrantDateUsingBlackScholesOptionPricingModelDetails" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.herontx.com/20230331/taxonomy/role/DisclosureSubsequentEventsAdditionalInformationDetails" xlink:href="hrtx-20230331.xsd#DisclosureSubsequentEventsAdditionalInformationDetails" xlink:type="simple"/>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfStockholdersEquityDeficitUnaudited">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementLineItems" xlink:label="us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementTable" xlink:label="us-gaap_StatementTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="us-gaap_StatementEquityComponentsAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SaleOfStockNameOfTransactionDomain" xlink:label="us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PrivatePlacementMember" xlink:label="us-gaap_PrivatePlacementMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsidiarySaleOfStockAxis" xlink:label="us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SaleOfStockNameOfTransactionDomain" xlink:label="us-gaap_SaleOfStockNameOfTransactionDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EquityComponentDomain" xlink:label="us-gaap_EquityComponentDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EquityComponentDomain" xlink:label="us-gaap_EquityComponentDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockholdersEquity" xlink:label="us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CommonStockMember" xlink:label="us-gaap_CommonStockMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SharesOutstanding" xlink:label="us-gaap_SharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="us-gaap_AdditionalPaidInCapitalMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalConvertibleDebtWithConversionFeature" xlink:label="us-gaap_AdjustmentsToAdditionalPaidInCapitalConvertibleDebtWithConversionFeature"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues" xlink:label="us-gaap_StockIssuedDuringPeriodValueNewIssues"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RetainedEarningsMember" xlink:label="us-gaap_RetainedEarningsMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="us-gaap_StockIssuedDuringPeriodSharesNewIssues"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation" xlink:label="us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation" xlink:label="us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan" xlink:label="us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans" xlink:label="us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_StockIssuedDuringPeriodValueWarrantsExercised" xlink:label="hrtx_StockIssuedDuringPeriodValueWarrantsExercised"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_StockIssuedDuringPeriodSharesWarrantsExercised" xlink:label="hrtx_StockIssuedDuringPeriodSharesWarrantsExercised"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities" xlink:label="us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" xlink:label="us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetIncomeLoss" xlink:label="us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:label="us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementEquityComponentsAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SaleOfStockNameOfTransactionDomain" xlink:to="us-gaap_PrivatePlacementMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsidiarySaleOfStockAxis" xlink:to="us-gaap_SaleOfStockNameOfTransactionDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_SubsidiarySaleOfStockAxis" xlink:to="us-gaap_SaleOfStockNameOfTransactionDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquity" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_SubsidiarySaleOfStockAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SharesOutstanding" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AdditionalPaidInCapitalMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AdjustmentsToAdditionalPaidInCapitalConvertibleDebtWithConversionFeature" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueNewIssues" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_RetainedEarningsMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesNewIssues" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="5" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueShareBasedCompensation" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="6" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensation" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="7" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="8" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="9" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="hrtx_StockIssuedDuringPeriodValueWarrantsExercised" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="10" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="hrtx_StockIssuedDuringPeriodSharesWarrantsExercised" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="11" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueConversionOfConvertibleSecurities" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="12" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="13" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="14" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NetIncomeLoss" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="15" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="16" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ComprehensiveIncomeNetOfTax" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureBusinessAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_BusinessLineItems" xlink:label="hrtx_BusinessLineItems"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_BusinessTable" xlink:label="hrtx_BusinessTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductOrServiceAxis" xlink:label="srt_ProductOrServiceAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductsAndServicesDomain" xlink:label="srt_ProductsAndServicesDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductsAndServicesDomain" xlink:label="srt_ProductsAndServicesDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_SegmentGeographicalDomain" xlink:label="srt_SegmentGeographicalDomain"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_EuropeAndCanadaMember" xlink:label="hrtx_EuropeAndCanadaMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_StatementGeographicalAxis" xlink:label="srt_StatementGeographicalAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_SegmentGeographicalDomain" xlink:label="srt_SegmentGeographicalDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_NumberOfCountriesApprovedDrug" xlink:label="hrtx_NumberOfCountriesApprovedDrug"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_HTX011Member" xlink:label="hrtx_HTX011Member"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashCashEquivalentsAndShortTermInvestments" xlink:label="us-gaap_CashCashEquivalentsAndShortTermInvestments"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_NetIncomeLoss" xlink:label="us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="hrtx_BusinessLineItems" xlink:to="hrtx_BusinessTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_SegmentGeographicalDomain" xlink:to="hrtx_EuropeAndCanadaMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementGeographicalAxis" xlink:to="srt_SegmentGeographicalDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_StatementGeographicalAxis" xlink:to="srt_SegmentGeographicalDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="hrtx_BusinessTable" xlink:to="srt_ProductOrServiceAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="hrtx_BusinessLineItems" xlink:to="hrtx_NumberOfCountriesApprovedDrug" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_HTX011Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="hrtx_BusinessTable" xlink:to="srt_StatementGeographicalAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="hrtx_BusinessLineItems" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="hrtx_BusinessLineItems" xlink:to="us-gaap_CashCashEquivalentsAndShortTermInvestments" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="hrtx_BusinessLineItems" xlink:to="us-gaap_NetIncomeLoss" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesPercentageOfNetProductSalesAndAccountsReceivableBalanceDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProductInformationLineItems" xlink:label="us-gaap_ProductInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfProductInformationTable" xlink:label="us-gaap_ScheduleOfProductInformationTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="us-gaap_ConcentrationRiskByTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="us-gaap_ConcentrationRiskTypeDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="us-gaap_ConcentrationRiskTypeDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SalesRevenueNetMember" xlink:label="us-gaap_SalesRevenueNetMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="us-gaap_ConcentrationRiskPercentage1"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_MajorCustomersAxis" xlink:label="srt_MajorCustomersAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_NameOfMajorCustomerDomain" xlink:label="srt_NameOfMajorCustomerDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_NameOfMajorCustomerDomain" xlink:label="srt_NameOfMajorCustomerDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_LargestCustomerMember" xlink:label="hrtx_LargestCustomerMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="us-gaap_ConcentrationRiskByBenchmarkAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="us-gaap_ConcentrationRiskBenchmarkDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CustomerConcentrationRiskMember" xlink:label="us-gaap_CustomerConcentrationRiskMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountsReceivableMember" xlink:label="us-gaap_AccountsReceivableMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SecondLargestCustomerMember" xlink:label="hrtx_SecondLargestCustomerMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ThirdLargestCustomerMember" xlink:label="hrtx_ThirdLargestCustomerMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SignificantCustomerMember" xlink:label="hrtx_SignificantCustomerMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ScheduleOfProductInformationTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="us-gaap_ConcentrationRiskByTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskBenchmarkDomain" xlink:to="us-gaap_SalesRevenueNetMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ConcentrationRiskPercentage1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="hrtx_LargestCustomerMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:to="us-gaap_ConcentrationRiskBenchmarkDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:to="us-gaap_ConcentrationRiskBenchmarkDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskTypeDomain" xlink:to="us-gaap_CustomerConcentrationRiskMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="us-gaap_ConcentrationRiskByBenchmarkAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskBenchmarkDomain" xlink:to="us-gaap_AccountsReceivableMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="hrtx_SecondLargestCustomerMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="srt_MajorCustomersAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="hrtx_ThirdLargestCustomerMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="hrtx_SignificantCustomerMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesSummaryOfDisaggregatedNetProductSalesDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProductInformationLineItems" xlink:label="us-gaap_ProductInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfProductInformationTable" xlink:label="us-gaap_ScheduleOfProductInformationTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductOrServiceAxis" xlink:label="srt_ProductOrServiceAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductsAndServicesDomain" xlink:label="srt_ProductsAndServicesDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax" xlink:label="us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_CINVANTIMember" xlink:label="hrtx_CINVANTIMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SUSTOLMember" xlink:label="hrtx_SUSTOLMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ZYNRELEFMember" xlink:label="hrtx_ZYNRELEFMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AponvieMember" xlink:label="hrtx_AponvieMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ScheduleOfProductInformationTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="srt_ProductOrServiceAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_CINVANTIMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_SUSTOLMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_ZYNRELEFMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_AponvieMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesSummaryOfActivityToProductReturnsDistributorFeesAndDiscountsRebatesAndAdministrativeFeesDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProductInformationLineItems" xlink:label="us-gaap_ProductInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfProductInformationTable" xlink:label="us-gaap_ScheduleOfProductInformationTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="us-gaap_ValuationAllowancesAndReservesDomain"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AllowanceForSalesReturns1Member" xlink:label="hrtx_AllowanceForSalesReturns1Member"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:label="us-gaap_ValuationAllowancesAndReservesTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ValuationAllowancesAndReservesDomain" xlink:label="us-gaap_ValuationAllowancesAndReservesDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ValuationAllowancesAndReservesBalance" xlink:label="us-gaap_ValuationAllowancesAndReservesBalance"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AllowanceForDistributorFeesMember" xlink:label="hrtx_AllowanceForDistributorFeesMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ValuationAllowancesAndReservesProvisions" xlink:label="hrtx_ValuationAllowancesAndReservesProvisions"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AllowanceForRebatesAndChargebacksMember" xlink:label="hrtx_AllowanceForRebatesAndChargebacksMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ValuationAllowancesAndReservesDeductions" xlink:label="us-gaap_ValuationAllowancesAndReservesDeductions"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ScheduleOfProductInformationTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowancesAndReservesDomain" xlink:to="hrtx_AllowanceForSalesReturns1Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="us-gaap_ValuationAllowancesAndReservesTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:to="us-gaap_ValuationAllowancesAndReservesDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:to="us-gaap_ValuationAllowancesAndReservesDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ValuationAllowancesAndReservesBalance" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowancesAndReservesDomain" xlink:to="hrtx_AllowanceForDistributorFeesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="hrtx_ValuationAllowancesAndReservesProvisions" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowancesAndReservesDomain" xlink:to="hrtx_AllowanceForRebatesAndChargebacksMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ValuationAllowancesAndReservesDeductions" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesCommonStockEquivalentsExcludedFromComputationOfNetLossPerShareDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:label="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:label="us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:label="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="us-gaap_AntidilutiveSecuritiesNameDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="us-gaap_EmployeeStockOptionMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_WarrantMember" xlink:label="us-gaap_WarrantMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ConvertibleDebtSecuritiesMember" xlink:label="us-gaap_ConvertibleDebtSecuritiesMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:to="us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:to="us-gaap_AntidilutiveSecuritiesNameDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:to="us-gaap_AntidilutiveSecuritiesNameDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:to="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AntidilutiveSecuritiesNameDomain" xlink:to="us-gaap_EmployeeStockOptionMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:to="us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AntidilutiveSecuritiesNameDomain" xlink:to="us-gaap_RestrictedStockUnitsRSUMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AntidilutiveSecuritiesNameDomain" xlink:to="us-gaap_WarrantMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AntidilutiveSecuritiesNameDomain" xlink:to="us-gaap_ConvertibleDebtSecuritiesMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureAccountingPoliciesAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProductInformationLineItems" xlink:label="us-gaap_ProductInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfProductInformationTable" xlink:label="us-gaap_ScheduleOfProductInformationTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="us-gaap_TypeOfAdoptionMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AccountingStandardsUpdate202006Member" xlink:label="us-gaap_AccountingStandardsUpdate202006Member"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdoptionDate" xlink:label="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdoptionDate"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="us-gaap_TypeOfAdoptionMember_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdopted" xlink:label="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdopted"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateImmaterialEffect" xlink:label="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateImmaterialEffect"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ScheduleOfProductInformationTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfProductInformationTable" xlink:to="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfAdoptionMember" xlink:to="us-gaap_AccountingStandardsUpdate202006Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdoptionDate" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:to="us-gaap_TypeOfAdoptionMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:to="us-gaap_TypeOfAdoptionMember_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateAdopted" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ProductInformationLineItems" xlink:to="us-gaap_ChangeInAccountingPrincipleAccountingStandardsUpdateImmaterialEffect" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureFairValueMeasurementsScheduleOfFinancialAssetsMeasuredOnRecurringBasisDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_MoneyMarketFundsMember" xlink:label="us-gaap_MoneyMarketFundsMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_USTreasurySecuritiesMember" xlink:label="us-gaap_USTreasurySecuritiesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ForeignCommercialPaperMember" xlink:label="hrtx_ForeignCommercialPaperMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueByAssetClassAxis" xlink:label="us-gaap_FairValueByAssetClassAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure" xlink:label="us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CashAndCashEquivalentsAxis" xlink:label="us-gaap_CashAndCashEquivalentsAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:label="us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FinancialInstrumentAxis" xlink:label="us-gaap_FinancialInstrumentAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="us-gaap_FairValueInputsLevel1Member"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="us-gaap_FairValueMeasurementsRecurringMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="us-gaap_FairValueInputsLevel2Member"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_UnitedStatesCommercialPaperMember" xlink:label="hrtx_UnitedStatesCommercialPaperMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AssetsFairValueDisclosure" xlink:label="us-gaap_AssetsFairValueDisclosure"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" xlink:to="us-gaap_MoneyMarketFundsMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="us-gaap_USTreasurySecuritiesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:to="hrtx_ForeignCommercialPaperMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_CashAndCashEquivalentsFairValueDisclosure" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByMeasurementFrequencyAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_CashAndCashEquivalentsAxis" xlink:to="us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_CashAndCashEquivalentsAxis" xlink:to="us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementFrequencyDomain" xlink:to="us-gaap_FairValueMeasurementsRecurringMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="us-gaap_DomesticCorporateDebtSecuritiesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtSecurities" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="hrtx_UnitedStatesCommercialPaperMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_AssetsFairValueDisclosure" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_CashAndCashEquivalentsAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FinancialInstrumentAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByAssetClassAxis" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureShortTermInvestmentsSummaryOfShortTermInvestmentsDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_USTreasurySecuritiesMember" xlink:label="us-gaap_USTreasurySecuritiesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_FinancialInstrumentAxis" xlink:label="us-gaap_FinancialInstrumentAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember" xlink:label="us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ForeignCorporateDebtSecuritiesMember" xlink:label="us-gaap_ForeignCorporateDebtSecuritiesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_UnitedStatesCommercialPaperMember" xlink:label="hrtx_UnitedStatesCommercialPaperMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ForeignCommercialPaperMember" xlink:label="hrtx_ForeignCommercialPaperMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="us-gaap_USTreasurySecuritiesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtSecuritiesAvailableForSaleTable" xlink:to="us-gaap_FinancialInstrumentAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="us-gaap_DomesticCorporateDebtSecuritiesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="us-gaap_ForeignCorporateDebtSecuritiesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="hrtx_UnitedStatesCommercialPaperMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtSecurities" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="hrtx_ForeignCommercialPaperMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureInventoryAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryLineItems" xlink:label="us-gaap_InventoryLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryCurrentTable" xlink:label="us-gaap_InventoryCurrentTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InventoryNet" xlink:label="us-gaap_InventoryNet"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductOrServiceAxis" xlink:label="srt_ProductOrServiceAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_ProductsAndServicesDomain" xlink:label="srt_ProductsAndServicesDomain"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ZYNRELEFsMember" xlink:label="hrtx_ZYNRELEFsMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProductionRelatedImpairmentsOrCharges" xlink:label="us-gaap_ProductionRelatedImpairmentsOrCharges"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_CINVANTIMember" xlink:label="hrtx_CINVANTIMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SUSTOLMember" xlink:label="hrtx_SUSTOLMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AponvieMember" xlink:label="hrtx_AponvieMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryCurrentTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_InventoryNet" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_InventoryCurrentTable" xlink:to="srt_ProductOrServiceAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_ZYNRELEFsMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InventoryLineItems" xlink:to="us-gaap_ProductionRelatedImpairmentsOrCharges" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_CINVANTIMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_SUSTOLMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="hrtx_AponvieMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureLeasesAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeLeaseDescriptionLineItems" xlink:label="us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeLeaseDescriptionTable" xlink:label="us-gaap_LesseeLeaseDescriptionTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfArrangementAxis" xlink:label="us-gaap_TypeOfArrangementAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="us-gaap_ArrangementsAndNonarrangementTransactionsMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:label="us-gaap_ArrangementsAndNonarrangementTransactionsMember_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_SegmentGeographicalDomain" xlink:label="srt_SegmentGeographicalDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.sec.gov/stpr/2022/stpr-2022.xsd#stpr_CA" xlink:label="stpr_CA"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AreaOfRealEstateProperty" xlink:label="us-gaap_AreaOfRealEstateProperty"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SubleaseAgreementMember" xlink:label="hrtx_SubleaseAgreementMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd#srt_StatementGeographicalAxis" xlink:label="srt_StatementGeographicalAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LeaseExpirationDate1" xlink:label="us-gaap_LeaseExpirationDate1"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseRenewalTerm" xlink:label="us-gaap_LesseeOperatingLeaseRenewalTerm"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_RemainingAreaOfRealEstateProperty" xlink:label="hrtx_RemainingAreaOfRealEstateProperty"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LesseeOperatingLeaseExistenceOfOptionToExtend" xlink:label="us-gaap_LesseeOperatingLeaseExistenceOfOptionToExtend"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeaseExpense" xlink:label="us-gaap_OperatingLeaseExpense"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_OperatingLeasePayments" xlink:label="us-gaap_OperatingLeasePayments"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeLeaseDescriptionTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_TypeOfArrangementAxis" xlink:to="us-gaap_ArrangementsAndNonarrangementTransactionsMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_TypeOfArrangementAxis" xlink:to="us-gaap_ArrangementsAndNonarrangementTransactionsMember_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_SegmentGeographicalDomain" xlink:to="stpr_CA" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_AreaOfRealEstateProperty" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ArrangementsAndNonarrangementTransactionsMember" xlink:to="hrtx_SubleaseAgreementMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_LesseeLeaseDescriptionTable" xlink:to="srt_StatementGeographicalAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementGeographicalAxis" xlink:to="srt_SegmentGeographicalDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LeaseExpirationDate1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_LesseeLeaseDescriptionTable" xlink:to="us-gaap_TypeOfArrangementAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeOperatingLeaseRenewalTerm" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="hrtx_RemainingAreaOfRealEstateProperty" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_LesseeOperatingLeaseExistenceOfOptionToExtend" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="5" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_OperatingLeaseExpense" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="6" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LesseeLeaseDescriptionLineItems" xlink:to="us-gaap_OperatingLeasePayments" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureReorganizationsAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementLineItems" xlink:label="us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementTable" xlink:label="us-gaap_StatementTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="us-gaap_RestructuringCostAndReserveAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringPlanDomain" xlink:label="us-gaap_RestructuringPlanDomain"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_TwoThousandTwentyTwoRestructuringPlanMember" xlink:label="hrtx_TwoThousandTwentyTwoRestructuringPlanMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="us-gaap_IncomeStatementLocationAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="us-gaap_IncomeStatementLocationDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="us-gaap_IncomeStatementLocationDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringPlanAxis" xlink:label="us-gaap_RestructuringPlanAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringPlanDomain" xlink:label="us-gaap_RestructuringPlanDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringCharges" xlink:label="us-gaap_RestructuringCharges"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="us-gaap_TypeOfRestructuringDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="us-gaap_TypeOfRestructuringDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="us-gaap_ResearchAndDevelopmentExpenseMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="us-gaap_EmployeeSeveranceMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_TwoThousandAndTwentyOneRestructuringPlanMember" xlink:label="hrtx_TwoThousandAndTwentyOneRestructuringPlanMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsForRestructuring" xlink:label="us-gaap_PaymentsForRestructuring"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SellingAndMarketingExpenseMember" xlink:label="us-gaap_SellingAndMarketingExpenseMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_AcceleratedNoncashStockOptionExpenseMember" xlink:label="hrtx_AcceleratedNoncashStockOptionExpenseMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GeneralAndAdministrativeExpenseMember" xlink:label="us-gaap_GeneralAndAdministrativeExpenseMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_RestructuringCostAndReserveAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RestructuringPlanDomain" xlink:to="hrtx_TwoThousandTwentyTwoRestructuringPlanMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RestructuringPlanAxis" xlink:to="us-gaap_RestructuringPlanDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RestructuringPlanAxis" xlink:to="us-gaap_RestructuringPlanDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RestructuringCharges" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RestructuringCostAndReserveAxis" xlink:to="us-gaap_TypeOfRestructuringDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RestructuringCostAndReserveAxis" xlink:to="us-gaap_TypeOfRestructuringDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_ResearchAndDevelopmentExpenseMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfRestructuringDomain" xlink:to="us-gaap_EmployeeSeveranceMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_IncomeStatementLocationAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RestructuringPlanDomain" xlink:to="hrtx_TwoThousandAndTwentyOneRestructuringPlanMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_PaymentsForRestructuring" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_SellingAndMarketingExpenseMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfRestructuringDomain" xlink:to="hrtx_AcceleratedNoncashStockOptionExpenseMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_RestructuringPlanAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_GeneralAndAdministrativeExpenseMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureConvertibleNotesAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentTable" xlink:label="us-gaap_DebtInstrumentTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="us-gaap_LongtermDebtTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain" xlink:label="us-gaap_DebtInstrumentRedemptionPeriodDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentRedemptionPeriodOneMember" xlink:label="us-gaap_DebtInstrumentRedemptionPeriodOneMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="us-gaap_LongtermDebtTypeDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="us-gaap_LongtermDebtTypeDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="us-gaap_StatementEquityComponentsAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EquityComponentDomain" xlink:label="us-gaap_EquityComponentDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_CommonStockMember" xlink:label="us-gaap_CommonStockMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentRedemptionPeriodAxis" xlink:label="us-gaap_DebtInstrumentRedemptionPeriodAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain" xlink:label="us-gaap_DebtInstrumentRedemptionPeriodDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="us-gaap_DebtInstrumentCarryingAmount"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SeniorUnsecuredConvertibleNotesMember" xlink:label="hrtx_SeniorUnsecuredConvertibleNotesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentRedemptionPeriodTwoMember" xlink:label="us-gaap_DebtInstrumentRedemptionPeriodTwoMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ProceedsFromConvertibleDebt" xlink:label="us-gaap_ProceedsFromConvertibleDebt"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_SeniorSecuredConvertibleNotesMember" xlink:label="hrtx_SeniorSecuredConvertibleNotesMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:label="us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentMaturityDate" xlink:label="us-gaap_DebtInstrumentMaturityDate"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentFrequencyOfPeriodicPayment" xlink:label="us-gaap_DebtInstrumentFrequencyOfPeriodicPayment"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentDateOfFirstRequiredPayment1" xlink:label="us-gaap_DebtInstrumentDateOfFirstRequiredPayment1"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_DebtInstrumentRedemptionPeriodStockPriceExceedsInPercentageOfConversionPrice" xlink:label="hrtx_DebtInstrumentRedemptionPeriodStockPriceExceedsInPercentageOfConversionPrice"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentConvertibleConversionPrice1" xlink:label="us-gaap_DebtInstrumentConvertibleConversionPrice1"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_DebtInstrumentConversionRatioMultipleOfPrincipal" xlink:label="hrtx_DebtInstrumentConversionRatioMultipleOfPrincipal"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_CommonSharesRegisteredForResaleInConnectionWithConvertibleNotes" xlink:label="hrtx_CommonSharesRegisteredForResaleInConnectionWithConvertibleNotes"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="us-gaap_PaymentsOfDebtIssuanceCosts"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentInterestRateEffectivePercentage" xlink:label="us-gaap_DebtInstrumentInterestRateEffectivePercentage"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InterestExpenseDebt" xlink:label="us-gaap_InterestExpenseDebt"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_InterestExpenseDebtExcludingAmortization" xlink:label="us-gaap_InterestExpenseDebtExcludingAmortization"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AmortizationOfFinancingCosts" xlink:label="us-gaap_AmortizationOfFinancingCosts"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_LongTermDebt" xlink:label="us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="us-gaap_DebtInstrumentFaceAmount"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DeferredFinanceCostsNet" xlink:label="us-gaap_DeferredFinanceCostsNet"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtConversionConvertedInstrumentSharesIssued1" xlink:label="us-gaap_DebtConversionConvertedInstrumentSharesIssued1"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_DebtInstrumentTerm" xlink:label="us-gaap_DebtInstrumentTerm"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AmortizationOfDebtDiscountPremium" xlink:label="us-gaap_AmortizationOfDebtDiscountPremium"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" xlink:label="us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="us-gaap_LongtermDebtTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentRedemptionPeriodDomain" xlink:to="us-gaap_DebtInstrumentRedemptionPeriodOneMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LongtermDebtTypeAxis" xlink:to="us-gaap_LongtermDebtTypeDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LongtermDebtTypeAxis" xlink:to="us-gaap_LongtermDebtTypeDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DebtInstrumentRedemptionPeriodAxis" xlink:to="us-gaap_DebtInstrumentRedemptionPeriodDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DebtInstrumentRedemptionPeriodAxis" xlink:to="us-gaap_DebtInstrumentRedemptionPeriodDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentCarryingAmount" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LongtermDebtTypeDomain" xlink:to="hrtx_SeniorUnsecuredConvertibleNotesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="us-gaap_DebtInstrumentRedemptionPeriodAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentRedemptionPeriodDomain" xlink:to="us-gaap_DebtInstrumentRedemptionPeriodTwoMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_ProceedsFromConvertibleDebt" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LongtermDebtTypeDomain" xlink:to="hrtx_SeniorSecuredConvertibleNotesMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="us-gaap_StatementEquityComponentsAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentInterestRateStatedPercentage" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentMaturityDate" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentFrequencyOfPeriodicPayment" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="5" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentDateOfFirstRequiredPayment1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="6" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="hrtx_DebtInstrumentRedemptionPeriodStockPriceExceedsInPercentageOfConversionPrice" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="7" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentConvertibleConversionPrice1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="8" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="hrtx_DebtInstrumentConversionRatioMultipleOfPrincipal" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="9" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="hrtx_CommonSharesRegisteredForResaleInConnectionWithConvertibleNotes" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="10" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_PaymentsOfDebtIssuanceCosts" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="11" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentInterestRateEffectivePercentage" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="12" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_InterestExpenseDebt" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="13" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_InterestExpenseDebtExcludingAmortization" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="14" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_AmortizationOfFinancingCosts" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="15" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_LongTermDebt" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="16" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentFaceAmount" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="17" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DeferredFinanceCostsNet" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="18" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtConversionConvertedInstrumentSharesIssued1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="19" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentTerm" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="20" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_AmortizationOfDebtDiscountPremium" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="21" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesConversionOfConvertibleSecurities" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureStockholdersEquityAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ClassOfStockLineItems" xlink:label="us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="us-gaap_ScheduleOfStockByClassTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="us-gaap_SubsequentEventTypeDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventMember" xlink:label="us-gaap_SubsequentEventMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SaleOfStockNameOfTransactionDomain" xlink:label="us-gaap_SaleOfStockNameOfTransactionDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PrivatePlacementMember" xlink:label="us-gaap_PrivatePlacementMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsidiarySaleOfStockAxis" xlink:label="us-gaap_SubsidiarySaleOfStockAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTypeAxis" xlink:label="us-gaap_SubsequentEventTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="us-gaap_StockIssuedDuringPeriodSharesNewIssues"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="us-gaap_SubsequentEventTypeDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_PreFundedWarrantMember" xlink:label="hrtx_PreFundedWarrantMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SharesIssuedPricePerShare" xlink:label="us-gaap_SharesIssuedPricePerShare"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights" xlink:label="us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1" xlink:label="us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ProceedsFromIssuanceOfCommonStockAndPreFundedWarrants" xlink:label="hrtx_ProceedsFromIssuanceOfCommonStockAndPreFundedWarrants"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_PaymentsOfStockIssuanceCosts" xlink:label="us-gaap_PaymentsOfStockIssuanceCosts"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_CommonSharesRegisteredForResale" xlink:label="hrtx_CommonSharesRegisteredForResale"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_ScheduleOfStockByClassTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SubsequentEventTypeDomain" xlink:to="us-gaap_SubsequentEventMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SaleOfStockNameOfTransactionDomain" xlink:to="us-gaap_PrivatePlacementMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsidiarySaleOfStockAxis" xlink:to="us-gaap_SaleOfStockNameOfTransactionDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfStockByClassTable" xlink:to="us-gaap_SubsequentEventTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesNewIssues" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsequentEventTypeAxis" xlink:to="us-gaap_SubsequentEventTypeDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_SubsequentEventTypeAxis" xlink:to="us-gaap_SubsequentEventTypeDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SaleOfStockNameOfTransactionDomain" xlink:to="hrtx_PreFundedWarrantMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfStockByClassTable" xlink:to="us-gaap_SubsidiarySaleOfStockAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_SharesIssuedPricePerShare" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="4" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="hrtx_ProceedsFromIssuanceOfCommonStockAndPreFundedWarrants" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="5" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_PaymentsOfStockIssuanceCosts" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="6" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="hrtx_CommonSharesRegisteredForResale" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfRestrictedStockUnitActivityDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AwardTypeAxis" xlink:label="us-gaap_AwardTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_default"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriod" xlink:label="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriod"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriod" xlink:label="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriod"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriodWeightedAverageGrantDateFairValue" xlink:label="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriodWeightedAverageGrantDateFairValue" xlink:label="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockUnitsRSUMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_default" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_AwardTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriod" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriod" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="5" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="6" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="7" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsReleasedInPeriodWeightedAverageGrantDateFairValue" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="8" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="hrtx_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresAndExpirationsInPeriodWeightedAverageGrantDateFairValue" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfStockBasedCompensationExpenseRelatedToStockBasedPaymentAwardsGrantedDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="us-gaap_IncomeStatementLocationAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="us-gaap_IncomeStatementLocationDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AllocatedShareBasedCompensationExpense" xlink:label="us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="us-gaap_ResearchAndDevelopmentExpenseMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_GeneralAndAdministrativeExpenseMember" xlink:label="us-gaap_GeneralAndAdministrativeExpenseMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SellingAndMarketingExpenseMember" xlink:label="us-gaap_SellingAndMarketingExpenseMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_AllocatedShareBasedCompensationExpense" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_ResearchAndDevelopmentExpenseMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_IncomeStatementLocationAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_GeneralAndAdministrativeExpenseMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_SellingAndMarketingExpenseMember" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ClassOfStockLineItems" xlink:label="us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="us-gaap_ScheduleOfStockByClassTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AwardTypeAxis" xlink:label="us-gaap_AwardTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_ScheduleOfStockByClassTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfStockByClassTable" xlink:to="us-gaap_AwardTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockUnitsRSUMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/Role_DisclosureEquityIncentivePlanSummaryOfFairValueOfOptionGrantOnGrantDateUsingBlackScholesOptionPricingModelDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="us-gaap_EmployeeStockOptionMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_AwardTypeAxis" xlink:label="us-gaap_AwardTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1" xlink:label="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_EmployeeStockOptionMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_AwardTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="2" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="3" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1" priority="2" use="optional"/>
  </link:definitionLink>
  <link:definitionLink xlink:type="extended" xlink:role="http://www.herontx.com/20230331/taxonomy/role/DisclosureSubsequentEventsAdditionalInformationDetails">
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventLineItems" xlink:label="us-gaap_SubsequentEventLineItems"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTable" xlink:label="us-gaap_SubsequentEventTable"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="us-gaap_SubsequentEventTypeDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventMember" xlink:label="us-gaap_SubsequentEventMember"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringCharges" xlink:label="us-gaap_RestructuringCharges"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="us-gaap_RestructuringCostAndReserveAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="us-gaap_TypeOfRestructuringDomain"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_SubsequentEventTypeAxis" xlink:label="us-gaap_SubsequentEventTypeAxis"/>
    <link:loc xlink:type="locator" xlink:href="https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="us-gaap_EmployeeSeveranceMember"/>
    <link:loc xlink:type="locator" xlink:href="hrtx-20230331.xsd#hrtx_NonCashStockBasedCompensationExpenseMember" xlink:label="hrtx_NonCashStockBasedCompensationExpenseMember"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SubsequentEventLineItems" xlink:to="us-gaap_SubsequentEventTable" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SubsequentEventTypeDomain" xlink:to="us-gaap_SubsequentEventMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SubsequentEventLineItems" xlink:to="us-gaap_RestructuringCharges" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RestructuringCostAndReserveAxis" xlink:to="us-gaap_TypeOfRestructuringDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_SubsequentEventTable" xlink:to="us-gaap_SubsequentEventTypeAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfRestructuringDomain" xlink:to="us-gaap_EmployeeSeveranceMember" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="0" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_SubsequentEventTypeAxis" xlink:to="us-gaap_SubsequentEventTypeDomain" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_SubsequentEventTable" xlink:to="us-gaap_RestructuringCostAndReserveAxis" priority="2" use="optional"/>
    <link:definitionArc xlink:type="arc" order="1" xbrldt:closed="false" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TypeOfRestructuringDomain" xlink:to="hrtx_NonCashStockBasedCompensationExpenseMember" priority="2" use="optional"/>
  </link:definitionLink>
</link:linkbase>
