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

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-05-28</periodOfReport>

    <issuer>
        <issuerCik>0000029534</issuerCik>
        <issuerName>DOLLAR GENERAL CORP</issuerName>
        <issuerTradingSymbol>DG</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001580655</rptOwnerCik>
            <rptOwnerName>ROWLAND DAVID P</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>100 MISSION RIDGE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>GOODLETTSVILLE</rptOwnerCity>
            <rptOwnerState>TN</rptOwnerState>
            <rptOwnerZipCode>37072</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-05-28</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1647</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>7847.6798</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Restricted stock units representing the right to receive shares of common stock upon vesting. The restricted stock units vest on May 28, 2027, subject to certain forfeiture and accelerated vesting provisions.</footnote>
        <footnote id="F2">Includes 29.053737 additional restricted stock units, which were acquired through exempt transactions as a result of dividend equivalent rights on April 21, 2026, representing the right to receive shares of common stock upon vesting.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ David P. Rowland</signatureName>
        <signatureDate>2026-05-29</signatureDate>
    </ownerSignature>
</ownershipDocument>
