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

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2005-06-07</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001116449</issuerCik>
        <issuerName>XENOGEN CORP</issuerName>
        <issuerTradingSymbol>XBEN</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001292049</rptOwnerCik>
            <rptOwnerName>MDS Pharma Services (US) Inc.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>621 ROSE STREET</rptOwnerStreet1>
            <rptOwnerStreet2>P.O. BOX 80837</rptOwnerStreet2>
            <rptOwnerCity>LINCOLN</rptOwnerCity>
            <rptOwnerState>NE</rptOwnerState>
            <rptOwnerZipCode>68501</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2005-06-07</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>10000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.001</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>15715</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Xenogen issued these shares to the Reporting Person pursuant to Xenogen's 2004 Director Stock Plan.  The shares are subject to automatic forfeiture and return to the plan upon the occurrence of certain events.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Peter E. Brent, Assistant Secretary and Director</signatureName>
        <signatureDate>2005-06-07</signatureDate>
    </ownerSignature>
</ownershipDocument>
