<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019d07a8-80fc-7f58-9e85-f1b776fe8f94,g:1cdbd4cd-1c2b-4308-80b5-4be702faac23-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xfor="http://www.x4pharma.com/20260331" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:dtr-types="http://www.xbrl.org/dtr/type/2024-01-31" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.x4pharma.com/20260331">
  <xs:import namespace="http://fasb.org/srt/2025" schemaLocation="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd"/>
  <xs:import namespace="http://fasb.org/us-gaap/2025" schemaLocation="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/dtr/type/2024-01-31" schemaLocation="https://www.xbrl.org/dtr/type/2024-01-31/types.xsd"/>
  <xs:import namespace="http://xbrl.org/2005/xbrldt" schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/country/2025" schemaLocation="https://xbrl.sec.gov/country/2025/country-2025.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/dei/2025" schemaLocation="https://xbrl.sec.gov/dei/2025/dei-2025.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/ecd/2025" schemaLocation="https://xbrl.sec.gov/ecd/2025/ecd-2025.xsd"/>
  <xs:annotation>
    <xs:appinfo>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="xfor-20260331_pre.xml" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="xfor-20260331_def.xml" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="xfor-20260331_lab.xml" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="xfor-20260331_cal.xml" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:type="simple"/>
      <link:roleType id="CoverPage" roleURI="http://www.x4pharma.com/role/CoverPage">
        <link:definition>0000001 - Document - Cover Page</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDBALANCESHEETS" roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS">
        <link:definition>9952151 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical" roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETSParenthetical">
        <link:definition>9952152 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME" roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONSANDCOMPREHENSIVELOSSINCOME">
        <link:definition>9952153 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS AND COMPREHENSIVE (LOSS) INCOME</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY">
        <link:definition>9952154 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS" roleURI="http://www.x4pharma.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS">
        <link:definition>9952155 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPolicies" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPolicies">
        <link:definition>9952156 - Disclosure - Description of Business and Summary of Significant Accounting Policies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StrategicRestructuringLiability" roleURI="http://www.x4pharma.com/role/StrategicRestructuringLiability">
        <link:definition>9952157 - Disclosure - Strategic Restructuring Liability</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LicenseAgreements" roleURI="http://www.x4pharma.com/role/LicenseAgreements">
        <link:definition>9952158 - Disclosure - License Agreements</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Revenue" roleURI="http://www.x4pharma.com/role/Revenue">
        <link:definition>9952159 - Disclosure - Revenue</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Inventory" roleURI="http://www.x4pharma.com/role/Inventory">
        <link:definition>9952160 - Disclosure - Inventory</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="PropertyandEquipment" roleURI="http://www.x4pharma.com/role/PropertyandEquipment">
        <link:definition>9952161 - Disclosure - Property and Equipment</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetNet" roleURI="http://www.x4pharma.com/role/IntangibleAssetNet">
        <link:definition>9952162 - Disclosure - Intangible Asset, Net</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedExpenses" roleURI="http://www.x4pharma.com/role/AccruedExpenses">
        <link:definition>9952163 - Disclosure - Accrued Expenses</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebt" roleURI="http://www.x4pharma.com/role/LongTermDebt">
        <link:definition>9952164 - Disclosure - Long-Term Debt</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Leases" roleURI="http://www.x4pharma.com/role/Leases">
        <link:definition>9952165 - Disclosure - Leases</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentandContingencies" roleURI="http://www.x4pharma.com/role/CommitmentandContingencies">
        <link:definition>9952166 - Disclosure - Commitment and Contingencies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EquityTransactions" roleURI="http://www.x4pharma.com/role/EquityTransactions">
        <link:definition>9952167 - Disclosure - Equity Transactions</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensation" roleURI="http://www.x4pharma.com/role/StockBasedCompensation">
        <link:definition>9952168 - Disclosure - Stock-Based Compensation</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxes" roleURI="http://www.x4pharma.com/role/IncomeTaxes">
        <link:definition>9952169 - Disclosure - Income Taxes</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentInformation" roleURI="http://www.x4pharma.com/role/SegmentInformation">
        <link:definition>9952170 - Disclosure - Segment Information</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SubsequentEvents" roleURI="http://www.x4pharma.com/role/SubsequentEvents">
        <link:definition>9952171 - Disclosure - Subsequent Events</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesPolicies" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesPolicies">
        <link:definition>9955511 - Disclosure - Description of Business and Summary of Significant Accounting Policies (Policies)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesTables" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesTables">
        <link:definition>9955512 - Disclosure - Description of Business and Summary of Significant Accounting Policies (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StrategicRestructuringLiabilityTables" roleURI="http://www.x4pharma.com/role/StrategicRestructuringLiabilityTables">
        <link:definition>9955513 - Disclosure - Strategic Restructuring Liability (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueTables" roleURI="http://www.x4pharma.com/role/RevenueTables">
        <link:definition>9955514 - Disclosure - Revenue (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="InventoryTables" roleURI="http://www.x4pharma.com/role/InventoryTables">
        <link:definition>9955515 - Disclosure - Inventory (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="PropertyandEquipmentNetTables" roleURI="http://www.x4pharma.com/role/PropertyandEquipmentNetTables">
        <link:definition>9955516 - Disclosure - Property and Equipment, Net (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetNetTables" roleURI="http://www.x4pharma.com/role/IntangibleAssetNetTables">
        <link:definition>9955517 - Disclosure - Intangible Asset, Net (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedExpensesTables" roleURI="http://www.x4pharma.com/role/AccruedExpensesTables">
        <link:definition>9955518 - Disclosure - Accrued Expenses (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebtTables" roleURI="http://www.x4pharma.com/role/LongTermDebtTables">
        <link:definition>9955519 - Disclosure - Long-Term Debt (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesTables" roleURI="http://www.x4pharma.com/role/LeasesTables">
        <link:definition>9955520 - Disclosure - Leases (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationTables" roleURI="http://www.x4pharma.com/role/StockBasedCompensationTables">
        <link:definition>9955521 - Disclosure - Stock-Based Compensation (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentInformationTables" roleURI="http://www.x4pharma.com/role/SegmentInformationTables">
        <link:definition>9955522 - Disclosure - Segment Information (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAdditionalInformationDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAdditionalInformationDetails">
        <link:definition>9955523 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Additional Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofCompensatingBalanceArrangementsDetail" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofCompensatingBalanceArrangementsDetail">
        <link:definition>9955524 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Schedule of Compensating Balance Arrangements (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofReconciliationofCashCashEquivalentsandRestrictedCashDetail">
        <link:definition>9955525 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Schedule of Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAssetsMeasuredonaRecurringBasisDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAssetsMeasuredonaRecurringBasisDetails">
        <link:definition>9955526 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Assets Measured on a Recurring Basis (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesDebtSecuritiesAvailableforSaleDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesDebtSecuritiesAvailableforSaleDetails">
        <link:definition>9955527 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Debt Securities Available for Sale (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesLiabilitiesMeasuredatFairValueDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesLiabilitiesMeasuredatFairValueDetails">
        <link:definition>9955528 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Liabilities Measured at Fair Value (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAggregateFairValueofFinancialInstrumentsDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesAggregateFairValueofFinancialInstrumentsDetails">
        <link:definition>9955529 - Disclosure - Description of Business and Summary of Significant Accounting Policies Aggregate Fair Value of Financial Instruments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesFairValueAssumptionsDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesFairValueAssumptionsDetails">
        <link:definition>9955530 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Fair Value Assumptions (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesSummaryofStockBasedCompensationExpenseClassificationDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesSummaryofStockBasedCompensationExpenseClassificationDetails">
        <link:definition>9955531 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Summary of Stock-Based Compensation Expense Classification (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesEarningsPerShareDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesEarningsPerShareDetails">
        <link:definition>9955532 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Earnings Per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofAntidilutiveSecuritiesExcludedfromComputationofDilutedNetLossperShareDetails" roleURI="http://www.x4pharma.com/role/DescriptionofBusinessandSummaryofSignificantAccountingPoliciesScheduleofAntidilutiveSecuritiesExcludedfromComputationofDilutedNetLossperShareDetails">
        <link:definition>9955533 - Disclosure - Description of Business and Summary of Significant Accounting Policies - Schedule of Anti-dilutive Securities Excluded from Computation of Diluted Net Loss per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StrategicRestructuringLiabilityNarrativeDetails" roleURI="http://www.x4pharma.com/role/StrategicRestructuringLiabilityNarrativeDetails">
        <link:definition>9955534 - Disclosure - Strategic Restructuring Liability - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StrategicRestructuringLiabilityReserveRollforwardDetails" roleURI="http://www.x4pharma.com/role/StrategicRestructuringLiabilityReserveRollforwardDetails">
        <link:definition>9955535 - Disclosure - Strategic Restructuring Liability - Reserve Rollforward (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueNarrativeDetails" roleURI="http://www.x4pharma.com/role/RevenueNarrativeDetails">
        <link:definition>9955536 - Disclosure - Revenue - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueProductRevenueNetDetails" roleURI="http://www.x4pharma.com/role/RevenueProductRevenueNetDetails">
        <link:definition>9955537 - Disclosure - Revenue - Product Revenue, Net (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRollforwardofAccountsReceivableDetails" roleURI="http://www.x4pharma.com/role/RevenueRollforwardofAccountsReceivableDetails">
        <link:definition>9955538 - Disclosure - Revenue - Rollforward of Accounts Receivable (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueAllocationofPerformanceObligationDetails" roleURI="http://www.x4pharma.com/role/RevenueAllocationofPerformanceObligationDetails">
        <link:definition>9955539 - Disclosure - Revenue - Allocation of Performance Obligation (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRollforwardofDeferredRevenueDetails" roleURI="http://www.x4pharma.com/role/RevenueRollforwardofDeferredRevenueDetails">
        <link:definition>9955540 - Disclosure - Revenue - Rollforward of Deferred Revenue (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="InventoryDetails" roleURI="http://www.x4pharma.com/role/InventoryDetails">
        <link:definition>9955541 - Disclosure - Inventory (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail" roleURI="http://www.x4pharma.com/role/PropertyandEquipmentNetScheduleofPropertyandEquipmentNetDetail">
        <link:definition>9955542 - Disclosure - Property and Equipment, Net - Schedule of Property and Equipment, Net (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="PropertyandEquipmentNetAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/PropertyandEquipmentNetAdditionalInformationDetail">
        <link:definition>9955543 - Disclosure - Property and Equipment, Net - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetNetDetails" roleURI="http://www.x4pharma.com/role/IntangibleAssetNetDetails">
        <link:definition>9955544 - Disclosure - Intangible Asset, Net (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetNetNarrativeDetails" roleURI="http://www.x4pharma.com/role/IntangibleAssetNetNarrativeDetails">
        <link:definition>9955545 - Disclosure - Intangible Asset, Net - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedExpensesScheduleofAccruedExpensesDetail" roleURI="http://www.x4pharma.com/role/AccruedExpensesScheduleofAccruedExpensesDetail">
        <link:definition>9955546 - Disclosure - Accrued Expenses - Schedule of Accrued Expenses (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebtSummaryofLongTermDebtDetail" roleURI="http://www.x4pharma.com/role/LongTermDebtSummaryofLongTermDebtDetail">
        <link:definition>9955547 - Disclosure - Long-Term Debt - Summary of Long Term Debt (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebtHerculesLoanAgreementAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/LongTermDebtHerculesLoanAgreementAdditionalInformationDetail">
        <link:definition>9955548 - Disclosure - Long Term Debt - Hercules Loan Agreement - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebtSummaryofInterestExpenseDetails" roleURI="http://www.x4pharma.com/role/LongTermDebtSummaryofInterestExpenseDetails">
        <link:definition>9955549 - Disclosure - Long-Term Debt - Summary of Interest Expense (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/LeasesAdditionalInformationDetail">
        <link:definition>9955550 - Disclosure - Leases - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesScheduleofComponentsofLeaseExpenseDetail" roleURI="http://www.x4pharma.com/role/LeasesScheduleofComponentsofLeaseExpenseDetail">
        <link:definition>9955551 - Disclosure - Leases - Schedule of Components of Lease Expense (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail" roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail">
        <link:definition>9955552 - Disclosure - Leases - Schedule of Maturities of Lease Liabilities (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1" roleURI="http://www.x4pharma.com/role/LeasesScheduleofMaturitiesofLeaseLiabilitiesDetail_1">
        <link:definition>9955552 - Disclosure - Leases - Schedule of Maturities of Lease Liabilities (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentandContingenciesAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/CommitmentandContingenciesAdditionalInformationDetail">
        <link:definition>9955553 - Disclosure - Commitment and Contingencies - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EquityTransactionsAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/EquityTransactionsAdditionalInformationDetail">
        <link:definition>9955554 - Disclosure - Equity Transactions - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationAdditionalInformationDetail" roleURI="http://www.x4pharma.com/role/StockBasedCompensationAdditionalInformationDetail">
        <link:definition>9955555 - Disclosure - Stock-Based Compensation - Additional Information (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationScheduleofAssumptionsUsedinBlackScholesOptionPricingModeltoDetermineGrantdateFairValueofStockOptionsGrantedDetail" roleURI="http://www.x4pharma.com/role/StockBasedCompensationScheduleofAssumptionsUsedinBlackScholesOptionPricingModeltoDetermineGrantdateFairValueofStockOptionsGrantedDetail">
        <link:definition>9955556 - Disclosure - Stock-Based Compensation - Schedule of Assumptions Used in Black-Scholes Option-Pricing Model to Determine Grant-date Fair Value of Stock Options Granted (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationSummaryofStockOptionActivityDetail" roleURI="http://www.x4pharma.com/role/StockBasedCompensationSummaryofStockOptionActivityDetail">
        <link:definition>9955557 - Disclosure - Stock-Based Compensation - Summary of Stock Option Activity (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationRestrictedStockUnitsDetails" roleURI="http://www.x4pharma.com/role/StockBasedCompensationRestrictedStockUnitsDetails">
        <link:definition>9955558 - Disclosure - Stock-Based Compensation - Restricted Stock Units (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationSummaryofStockBasedCompensationExpenseClassificationDetails" roleURI="http://www.x4pharma.com/role/StockBasedCompensationSummaryofStockBasedCompensationExpenseClassificationDetails">
        <link:definition>9955559 - Disclosure - Stock-Based Compensation Summary of Stock-Based Compensation Expense Classification (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentInformationNarrativeDetails" roleURI="http://www.x4pharma.com/role/SegmentInformationNarrativeDetails">
        <link:definition>9955560 - Disclosure - Segment Information - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentInformationDetails" roleURI="http://www.x4pharma.com/role/SegmentInformationDetails">
        <link:definition>9955561 - Disclosure - Segment Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
    </xs:appinfo>
  </xs:annotation>
  <xs:element id="xfor_LongTermDebtNonCurrentIncludingAccretion" abstract="false" name="LongTermDebtNonCurrentIncludingAccretion" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_LicenseAndOtherRevenueMember" abstract="true" name="LicenseAndOtherRevenueMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_OperatingIncomeExpenses" abstract="false" name="OperatingIncomeExpenses" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_TemporaryEquityRepurchaseOfConvertiblePreferredStock" abstract="false" name="TemporaryEquityRepurchaseOfConvertiblePreferredStock" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_SharesIssuedDuringPeriodSharesExerciseOfWarrants" abstract="false" name="SharesIssuedDuringPeriodSharesExerciseOfWarrants" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="xfor_SharesIssuedDuringPeriodValueExerciseOfWarrants" abstract="false" name="SharesIssuedDuringPeriodValueExerciseOfWarrants" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_NonCashLeaseExpense" abstract="false" name="NonCashLeaseExpense" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_NonCashInterestExpense" abstract="false" name="NonCashInterestExpense" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ChangeInFairValueOfConvertiblePreferredStockWarrantLiability" abstract="false" name="ChangeInFairValueOfConvertiblePreferredStockWarrantLiability" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_IncreaseDecreaseInLeaseLiabilities" abstract="false" name="IncreaseDecreaseInLeaseLiabilities" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_AccruedExpensesTextBlock" abstract="false" name="AccruedExpensesTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="xfor_ScheduleOfReconciliationOfCashAndCashEquivalentsAndRestrictedCashToCashFlowsTableTextBlock" abstract="false" name="ScheduleOfReconciliationOfCashAndCashEquivalentsAndRestrictedCashToCashFlowsTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="xfor_ScheduleOfProductReserveAccountsTableTextBlock" abstract="false" name="ScheduleOfProductReserveAccountsTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="xfor_ScheduleOfAllocationOfPerformanceObligationTableTextBlock" abstract="false" name="ScheduleOfAllocationOfPerformanceObligationTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="xfor_ScheduleOfAccountingPoliciesTable" abstract="true" name="ScheduleOfAccountingPoliciesTable" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:hypercubeItem" type="xbrli:stringItemType"/>
  <xs:element id="xfor_PreFundedWarrantMember" abstract="true" name="PreFundedWarrantMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_MinCashTestDate1Member" abstract="true" name="MinCashTestDate1Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_HerculesSecondAmendedLoanAgreementMember" abstract="true" name="HerculesSecondAmendedLoanAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_AccountingPoliciesLineItems" abstract="true" name="AccountingPoliciesLineItems" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_LineOfCreditCovenantMinimumCash" abstract="false" name="LineOfCreditCovenantMinimumCash" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ViennaLeaseAgreementMember" abstract="true" name="ViennaLeaseAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_AllstonLeaseAgreementMember" abstract="true" name="AllstonLeaseAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_NumberOfRestructuringActions" abstract="false" name="NumberOfRestructuringActions" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="xfor_CollaborationLicenseAndFundingArrangementsTable" abstract="true" name="CollaborationLicenseAndFundingArrangementsTable" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:hypercubeItem" type="xbrli:stringItemType"/>
  <xs:element id="xfor_NorgineAgreementMember" abstract="true" name="NorgineAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_CollaborationLicenseAndFundingArrangementsLineItems" abstract="true" name="CollaborationLicenseAndFundingArrangementsLineItems" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_OneTimeUpfrontPayment" abstract="false" name="OneTimeUpfrontPayment" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ProductReservesAxis" abstract="true" name="ProductReservesAxis" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:dimensionItem" type="xbrli:stringItemType"/>
  <xs:element id="xfor_ProductReservesDomain" abstract="true" name="ProductReservesDomain" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_RebatesAndDiscountsMember" abstract="true" name="RebatesAndDiscountsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_CoPayAssistanceMember" abstract="true" name="CoPayAssistanceMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_ProductReturnsMember" abstract="true" name="ProductReturnsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_DisaggregationOfRevenueRollForward" abstract="true" name="DisaggregationOfRevenueRollForward" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_ProductReserveAccount" abstract="false" name="ProductReserveAccount" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ProvisionRelatedToRevenue" abstract="false" name="ProvisionRelatedToRevenue" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ProvisionRelatedToRevenueProcessedInPriorPeriods" abstract="false" name="ProvisionRelatedToRevenueProcessedInPriorPeriods" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_CreditsAndPaymentsMadeDuringThePeriod" abstract="false" name="CreditsAndPaymentsMadeDuringThePeriod" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_AccountsReceivableAfterAllowanceForCreditLossCurrentRollForward" abstract="true" name="AccountsReceivableAfterAllowanceForCreditLossCurrentRollForward" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_AccountsReceivableAfterAllowanceForCreditLossCurrentIncreaseDuringPeriod" abstract="false" name="AccountsReceivableAfterAllowanceForCreditLossCurrentIncreaseDuringPeriod" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_AccountsReceivableAfterAllowanceForCreditLossCurrentDecreaseDuringPeriod" abstract="false" name="AccountsReceivableAfterAllowanceForCreditLossCurrentDecreaseDuringPeriod" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_NorgineAgreementLicenseMember" abstract="true" name="NorgineAgreementLicenseMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_NorgineAgreementRDWHIMMember" abstract="true" name="NorgineAgreementRDWHIMMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_NorgineAgreementRDCNMember" abstract="true" name="NorgineAgreementRDCNMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_NorgineAgreementDrugProductSupplyMember" abstract="true" name="NorgineAgreementDrugProductSupplyMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_DeferredRevenueRollForward" abstract="true" name="DeferredRevenueRollForward" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_LabEquipmentMember" abstract="true" name="LabEquipmentMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour" abstract="false" name="FiniteLivedIntangibleAssetExpectedAmortizationAfterYearFour" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_AccruedExternalResearchAndDevelopmentExpenses" abstract="false" name="AccruedExternalResearchAndDevelopmentExpenses" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_AccretionOnLongTermDebt" abstract="false" name="AccretionOnLongTermDebt" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_LongTermDebtIncludingAccretion" abstract="false" name="LongTermDebtIncludingAccretion" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_HerculesLoanAgreementMember" abstract="true" name="HerculesLoanAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_LongTermDebtAndEOTPayment" abstract="false" name="LongTermDebtAndEOTPayment" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_ViennaAustriaLeaseMember" abstract="true" name="ViennaAustriaLeaseMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_OfficeSpaceUnderLeaseAgreement" abstract="false" name="OfficeSpaceUnderLeaseAgreement" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:areaItemType"/>
  <xs:element id="xfor_ContingenciesAndCommitmentsTable" abstract="true" name="ContingenciesAndCommitmentsTable" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:hypercubeItem" type="xbrli:stringItemType"/>
  <xs:element id="xfor_IndemnificationAgreementsMember" abstract="true" name="IndemnificationAgreementsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_ContingenciesAndCommitmentsLineItems" abstract="true" name="ContingenciesAndCommitmentsLineItems" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="xfor_ATMSalesAgreementMember" abstract="true" name="ATMSalesAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_TwoThousandNineteenEquityIncentivePlanMember" abstract="true" name="TwoThousandNineteenEquityIncentivePlanMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_TwoThousandSeventeenEquityIncentivePlanMember" abstract="true" name="TwoThousandSeventeenEquityIncentivePlanMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardsGrantInPeriodWeightedAverageGrantDateFairValue" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardsGrantInPeriodWeightedAverageGrantDateFairValue" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:perShareItemType"/>
  <xs:element id="xfor_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeitedIntrinsicValue" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeitedIntrinsicValue" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="xfor_U.S.SpecialtyPharmacyCustomerMember" abstract="true" name="U.S.SpecialtyPharmacyCustomerMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_UnitedKingdomSpecialPharmacyCustomerMember" abstract="true" name="UnitedKingdomSpecialPharmacyCustomerMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="xfor_ReportableSegmentMember" abstract="true" name="ReportableSegmentMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
</xs:schema>
