<?xml version="1.0"?>
<ownershipDocument>
    <schemaVersion>X0101</schemaVersion>

    <documentType>4</documentType><periodOfReport>2003-06-30</periodOfReport>
    <issuer>
        <issuerCik>0000277595</issuerCik>
        <issuerName>ENERGEN CORP</issuerName>
        <issuerTradingSymbol>EGN</issuerTradingSymbol></issuer><reportingOwner><reportingOwnerId>
            <rptOwnerCik>0001181827</rptOwnerCik>
            <rptOwnerName>CARR GRACE B</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>  </rptOwnerStreet1>
            <rptOwnerStreet2>  </rptOwnerStreet2>
            <rptOwnerCity>  </rptOwnerCity>
            <rptOwnerState>  </rptOwnerState>
            <rptOwnerZipCode>  </rptOwnerZipCode>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>0</isDirector><isOfficer>1</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther><officerTitle>Vice President and Controller</officerTitle></reportingOwnerRelationship></reportingOwner><derivativeSecurity><securityTitle><value>Deferred Shares</value></securityTitle><conversionOrExercisePrice><value>0</value><footnoteId id="F1"/></conversionOrExercisePrice><transactionDate><value>2003-06-30</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>A</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>3</value></transactionShares><transactionValue><value>33.30</value></transactionValue><transactionAcquiredDisposedCode><value>A</value></transactionAcquiredDisposedCode></transactionAmounts><exerciseDate><value>1988-08-08</value><footnoteId id="F2"/></exerciseDate><expirationDate><value>1988-08-08</value><footnoteId id="F2"/></expirationDate><underlyingSecurity><underlyingSecurityTitle><value>Common Stock</value></underlyingSecurityTitle><underlyingSecurityShares><value>3</value></underlyingSecurityShares></underlyingSecurity><postTransactionAmounts><sharesOwnedFollowingTransaction><value>432</value><footnoteId id="F3"/><footnoteId id="F4"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></derivativeSecurity><footnotes><footnote id="F1">Securities convert to common stock on a one-for-one basis.</footnote><footnote id="F2">The first to occur of 70th birthday, termination of the Plan, termination for cause or one or more other events elected by the participant and approved by Energen.</footnote><footnote id="F3">Energen Corporation Deferred Compensation Plan, number of shares and securities are estimates based on recordkeepers' unit accounting.  In addition, as previously reported under Table I, the reporting person directly holds 3,856 shares (which includes 1,620 restricted shares and 281 shares held in DRIP account).</footnote><footnote id="F4">The reporting person indirectly holds
(a) 1,242 shares under the Energen Corporation Employee Savings Plan (the number of shares is estimated based on trustee's unit accounting)
(b) 400 shares by husband </footnote></footnotes><ownerSignature><signatureName>J.D. Woodruff, Attorney in Fact</signatureName><signatureDate>2003-07-01</signatureDate></ownerSignature></ownershipDocument>

