<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-05-13</periodOfReport>

    <issuer>
        <issuerCik>0001503802</issuerCik>
        <issuerName>Karyopharm Therapeutics Inc.</issuerName>
        <issuerTradingSymbol>KPTI</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0002045943</rptOwnerCik>
            <rptOwnerName>Abate Kristin</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>C/O KARYOPHARM THERAPEUTICS INC.</rptOwnerStreet1>
            <rptOwnerStreet2>85 WELLS AVENUE</rptOwnerStreet2>
            <rptOwnerCity>NEWTON</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02459</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>false</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>Chief Accounting Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-05-13</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>121</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>23854</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-05-14</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
                <footnoteId id="F3"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>53</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>9.50</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>23801</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Represents the number of shares of the issuer's common stock underlying performance-based restricted stock units (&quot;PSUs&quot;) granted in February 2024 that have been earned based on the level of achievement of the clinical milestone for complete enrollment in the Company's Phase 3 XPORT-EC-042 trial, as certified by the issuer's Compensation Committee on May 13, 2026. Each earned PSU represents the contingent right to receive one share of the issuer's common stock upon vesting. The earned PSUs vested on May 13, 2026.</footnote>
        <footnote id="F2">Includes 1,670 shares acquired by the reporting person under the Karyopharm Therapeutics Inc. 2013 Employee Stock Purchase Plan, as amended, on April 30, 2026.</footnote>
        <footnote id="F3">This transaction was effected pursuant to a durable automatic sale instruction plan adopted by the reporting person on May 27, 2021, and represents a broker-assisted sale of shares to satisfy the payment of withholding tax liability incurred upon the vesting of PSUs. The sale does not represent a discretionary trade by the reporting person.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Nancy Smith as Attorney-in-Fact for Kristin Abate</signatureName>
        <signatureDate>2026-05-15</signatureDate>
    </ownerSignature>
</ownershipDocument>