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

    <documentType>4</documentType><periodOfReport>2003-08-27</periodOfReport>
    <issuer>
        <issuerCik>0001068796</issuerCik>
        <issuerName>MAXYGEN INC</issuerName>
        <issuerTradingSymbol>MAXY</issuerTradingSymbol></issuer><reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001101713</rptOwnerCik>
            <rptOwnerName>RINGOLD GORDON</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O MAXYGEN, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>515 GALVESTON DRIVE</rptOwnerStreet2>
            <rptOwnerCity>REDWOOD CITY</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94063</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>1</isDirector><isOfficer>0</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther></reportingOwnerRelationship></reportingOwner><nonDerivativeTable><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-06-06</value></transactionDate><transactionCoding><transactionFormType>5</transactionFormType><transactionCode>G</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>12000</value></transactionShares><transactionPricePerShare><footnoteId id="F1"/></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>2494813</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Technogen and Family Trust</value><footnoteId id="F2"/></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-27</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>655</value></transactionShares><transactionPricePerShare><value>12.50</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>526076</value><footnoteId id="F3"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-27</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>100</value></transactionShares><transactionPricePerShare><value>12.48</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>525976</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-27</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>2645</value></transactionShares><transactionPricePerShare><value>12.47</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>523331</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-27</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>5100</value></transactionShares><transactionPricePerShare><value>12.4504</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>518231</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-27</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>300</value></transactionShares><transactionPricePerShare><value>12.45</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>517931</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-28</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>500</value></transactionShares><transactionPricePerShare><value>12.50</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>517431</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-28</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>34</value></transactionShares><transactionPricePerShare><value>12.455</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>517397</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeTransaction><securityTitle><value>Common Stock</value></securityTitle><transactionDate><value>2003-08-28</value></transactionDate><transactionCoding><transactionFormType>4</transactionFormType><transactionCode>S</transactionCode><equitySwapInvolved>0</equitySwapInvolved></transactionCoding><transactionAmounts><transactionShares><value>3750</value></transactionShares><transactionPricePerShare><value>12.45</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>513647</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Gordon Ringold and Tanya Zarucki 1999 Trust </value></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeHolding><securityTitle><value>Common Stock</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>1396531</value><footnoteId id="F4"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Technogen</value><footnoteId id="F5"/></natureOfOwnership></ownershipNature></nonDerivativeHolding><nonDerivativeHolding><securityTitle><value>Common Stock</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>865</value><footnoteId id="F6"/></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></nonDerivativeHolding></nonDerivativeTable><footnotes><footnote id="F1">The disposition had no price as it was a gift.</footnote><footnote id="F2">The indirect holding of Dr. Ringold after the indicated transaction included 1,961,574 shares of Maxygen common stock that were held by Technogen Associates, L.P. and 63,198 shares that were held by Technogen Enterprises, L.L.C.  Technogen Managers, L.L.C. is the general partner of Technogen Associates , L.P.  Dr. Ringold is a Managing Member of Technogen Enterprises, L.L.C. and Technogen Managers, L.L.C. and disclaims beneficial ownership of these shares except to the extent of his pecuniary interest in the limited liability companies.  Dr. Ringold's indirect holdings also include 470,041 shares held by the Gordon Ringold and Tanya Zarucki 1999 Trust. </footnote><footnote id="F3">Includes 5,632 shares of Maxygen common stock received as a pro rata distribution from Technogen Associates L.P.  Also includes 51,058 shares received as a pro rata distribution from Technogen Managers, L.L.C., which received the shares as a result of a pro rata distribution from Technogen Associates, L.P.  In prior reports (and in footnote 2 hereof), Dr. Ringold reported beneficial ownership of all shares held by Technogen Associates L.P.</footnote><footnote id="F4">Excludes 628,241 shares of Maxygen common stock distributed by Technogen Associates L.P. since the transaction reported on line 1 hereof.</footnote><footnote id="F5">Consists of 1,333,333 shares of Maxygen common stock held by Technogen Associates, L.P. and 63,198 shares held by Technogen Enterprises, L.L.C.  Technogen Managers, L.L.C. is the general partner of Technogen Associates , L.P.  Dr. Ringold is a Managing Member of Technogen Enterprises, L.L.C. and Technogen Managers, L.L.C. and disclaims beneficial ownership of these shares except to the extent of his pecuniary interest in the limited liability companies.</footnote><footnote id="F6">Consists of 865 shares of Maxygen common stock received as a pro rata distribution from Technogen Managers, L.L.C., which received the shares as a result of a pro rata distribution from Technogen Associates, L.P.  In prior reports (and in footnote 2 hereof), Dr. Ringold reported indirect beneficial ownership of all shares held by Technogen Associates, L.P. </footnote></footnotes><remarks/><ownerSignature><signatureName>Gordon Ringold</signatureName><signatureDate>2003-08-28</signatureDate></ownerSignature></ownershipDocument>

