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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-10-20</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001890584</rptOwnerCik>
            <rptOwnerName>Peng Yongdong</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>Chief Executive Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A ordinary shares</value>
            </securityTitle>
            <transactionDate>
                <value>2026-10-20</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>526428</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>63350679</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By controlled corporation</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class B ordinary shares</value>
            </securityTitle>
            <transactionDate>
                <value>2026-10-20</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>526428</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>93555863</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By controlled corporation</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">On October 20, 2026, 14,308,821 Class A ordinary shares represented by repurchased ADSs and 4,915,600 Class A ordinary shares repurchased on the SEHK were cancelled. As a result, Mr. Peng, as a beneficiary of weighted voting rights (as defined under the Hong Kong Listing Rules), converted 526,428 Class B ordinary shares into Class A ordinary shares on 1:1 ratio under the Hong Kong Listing Rules.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/PENG Yongdong</signatureName>
        <signatureDate>2026-10-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
