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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-11-18</periodOfReport>

    <issuer>
        <issuerCik>0001809587</issuerCik>
        <issuerName>KE Holdings Inc.</issuerName>
        <issuerTradingSymbol>BEKE</issuerTradingSymbol>
        <issuerForeignTradingSymbol>SEHK: 2423</issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0002110619</rptOwnerCik>
            <rptOwnerName>Xu Wangang</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>true</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>ORIENTAL ELECTRONIC TECHNOLOGY BUILDING</rptOwnerStreet1>
            <rptOwnerStreet2>NO. 2 CHUANGYE ROAD, HAIDIAN DISTRICT</rptOwnerStreet2>
            <rptOwnerCity>BEIJING</rptOwnerCity>
            <rptOwnerNonUSStateTerritory></rptOwnerNonUSStateTerritory>
            <rptOwnerCountry>F4</rptOwnerCountry>
            <rptOwnerZipCode>100086</rptOwnerZipCode>
            <rptOwnerStateDescription>CHINA</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>Executive Director</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A ordinary shares</value>
            </securityTitle>
            <transactionDate>
                <value>2026-11-18</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>750000</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>6.1289</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>10502307</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Myriad Talent Investment Limited</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The 750,000 Class A ordinary shares represent 250,000 American Depositary Shares (ADSs) disposed by Myriad Talent Investment Limited on November 18, 2026 and settled on November 19, 2026.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/XU Wangang</signatureName>
        <signatureDate>2026-11-20</signatureDate>
    </ownerSignature>
</ownershipDocument>
