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

    <schemaVersion>X0407</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2023-04-01</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001646121</rptOwnerCik>
            <rptOwnerName>Garratt John W</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>100 MISSION RIDGE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>GOODLETTSVILLE</rptOwnerCity>
            <rptOwnerState>TN</rptOwnerState>
            <rptOwnerZipCode>37072</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>President &amp; CFO</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2023-04-01</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>4954</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>210.46</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>31151</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Shares of common stock surrendered to the Issuer in payment of taxes in connection with the vesting and payment of a portion of performance share units (&quot;PSUs&quot;) granted March 17, 2020 (997 shares from the vesting of PSUs earned as a result of the Issuer's fiscal year 2020 adjusted EBITDA performance and 2,909 shares from the vesting of PSUs earned as a result of the Issuer's fiscal years 2020-2022 adjusted ROIC performance), March 16, 2021 (551 shares from the vesting of PSUs earned as a result of the Issuer's fiscal year 2021 adjusted EBITDA performance) and March 15, 2022 (497 shares from the vesting of PSUs earned as a result of the Issuer's fiscal year 2022 adjusted EBITDA performance).</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ John Garratt</signatureName>
        <signatureDate>2023-04-04</signatureDate>
    </ownerSignature>
</ownershipDocument>
