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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-10-15</periodOfReport>

    <issuer>
        <issuerCik>0001293613</issuerCik>
        <issuerName>Kayne Anderson Energy Infrastructure Fund, Inc.</issuerName>
        <issuerTradingSymbol>KYN</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001529735</rptOwnerCik>
            <rptOwnerName>MetLife Investment Management, LLC</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>ONE METLIFE WAY</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>WHIPPANY</rptOwnerCity>
            <rptOwnerState>NJ</rptOwnerState>
            <rptOwnerZipCode>07981</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isTenPercentOwner>true</isTenPercentOwner>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>4.43% Series AAA Senior Unsecured Notes Due October 16, 2028</value>
            </securityTitle>
            <transactionDate>
                <value>2025-10-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>10000000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>10000000</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <valueOwnedFollowingTransaction>
                    <value>10000000</value>
                </valueOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See Footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>4.60% Series BBB Senior Unsecured Notes Due October 15, 2030</value>
            </securityTitle>
            <transactionDate>
                <value>2025-10-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>15000000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>15000000</value>
                    <footnoteId id="F4"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <valueOwnedFollowingTransaction>
                    <value>15000000</value>
                </valueOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See Footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This price reflects the aggregate principal amount of the 4.43% Series AAA Senior Unsecured Notes Due October 16, 2028 purchased.</footnote>
        <footnote id="F2">These securities are held directly by a client for whom the Reporting Person serves as investment manager.</footnote>
        <footnote id="F3">The Reporting Person disclaims beneficial ownership of the securities reported herein, except to the extent of its pecuniary interest therein, and this report shall not be deemed an admission that the Reporting Person is the beneficial owner of such securities for purposes of Section 16 of the Securities Exchange Act of 1934, as amended, or for any other purpose.</footnote>
        <footnote id="F4">This price reflects the aggregate principal amount of the 4.60% Series BBB Senior Unsecured Notes Due October 15, 2030 purchased.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Israel Grafstein, Chief Compliance Officer of MetLife Investment Management, LLC</signatureName>
        <signatureDate>2025-10-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
