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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-01-24</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001865796</rptOwnerCik>
            <rptOwnerName>Cheng Sohanya Roshan</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <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>EVP &amp; Chief Commercial Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-01-24</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>14167</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>221499</value>
                    <footnoteId id="F2"/>
                </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 2023 that have been earned based on the level of achievement of a certain clinical milestone, as certified by the issuer's compensation committee on January 24, 2024. Each earned PSU represents the contingent right to receive one share of the issuer's common stock upon vesting. The earned PSUs will vest on February 28, 2024, the first anniversary of the grant date, subject to continued employment through such vesting date.</footnote>
        <footnote id="F2">Includes 3,246 shares acquired by the reporting person under the Karyopharm Therapeutics Inc. Amended and Restated 2013 Employee Stock Purchase Plan.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/Nancy Smith as Attorney-in-Fact for Sohanya Cheng</signatureName>
        <signatureDate>2024-01-25</signatureDate>
    </ownerSignature>
</ownershipDocument>
