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

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2004-12-17</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001178670</issuerCik>
        <issuerName>ALNYLAM PHARMACEUTICALS, INC.</issuerName>
        <issuerTradingSymbol>ALNY</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001114126</rptOwnerCik>
            <rptOwnerName>POLARIS VENTURE MANAGEMENT CO III LLC</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001104639</rptOwnerCik>
            <rptOwnerName>POLARIS VENTURE PARTNERS III LP</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001114889</rptOwnerCik>
            <rptOwnerName>POLARIS VENTURE PARTNERS ENTREPRENEURS FUND III LP</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001114437</rptOwnerCik>
            <rptOwnerName>POLARIS VENTURE PARTNERS FOUNDERS FUND III LP</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001295787</rptOwnerCik>
            <rptOwnerName>Arnold Stephen D</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001295676</rptOwnerCik>
            <rptOwnerName>Flint Jonathan A</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001117003</rptOwnerCik>
            <rptOwnerName>MCGUIRE TERRANCE</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001018394</rptOwnerCik>
            <rptOwnerName>SPOON ALAN G</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1000 WINTER STREET</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451-1215</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>2004-12-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>650</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>6.693</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>60601</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F1"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                    <footnoteId id="F6"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2004-12-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>25455</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>6.693</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>2332643</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                    <footnoteId id="F6"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2004-12-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>395</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>6.693</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>36783</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                    <footnoteId id="F6"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">These shares are owned directly by Polaris Venture Partners Entrepreneurs' Fund III, L.P. (&quot;PVPEF III&quot;), of which Polaris Venture Management Co. III, LLC (&quot;PVM III&quot;) is the General Partner. As such, PVM III may be deemed to share voting and investment powers with respect to the shares owned by PVPEF III.</footnote>
        <footnote id="F2">These shares are owned directly by Polaris Venture Partners III, L.P. (&quot;PVP III&quot;) of which PVM III is the General Partner. As such, PVM III may be deemed to share voting and investment powers with respect to the shares owned by PVP III.</footnote>
        <footnote id="F3">These shares are owned directly by Polaris Venture Partners Founders' Fund III, L.P. (&quot;PVPFF III&quot;), of which PVM III is the General Partner. As such, PVM III may be deemed to share voting and investment powers with respect to the shares owned by PVPFF III.</footnote>
        <footnote id="F4">PVM III is the General Partner of PVP III, PVPEF III and PVPFF III, and Stephen D. Arnold, Jonathan A. Flint, Terrance G. McGuire and Alan G. Spoon, the managing members of PVM III, may be deemed to share voting and dispositive power over the shares held by PVP III, PVPEF III and PVPFF III. Such persons disclaim beneficial ownership of shares held by PVP III, PVPEF III and PVPFF III except to the extent of any pecuniary interest therein.</footnote>
        <footnote id="F5">North Star Ventures directly or indirectly provides investment advisory services to various venture capital funds, including PVM III, the General Partner of PVPEF III, PVPFF III and PVP III. The respective General Partners of these funds exercise sole voting and investment power with respect to the shares held by such funds.</footnote>
        <footnote id="F6">Continued from footnote 5. The members of North Star Ventures are members of PVM III, the General Partner of PVPEF III, PVPFF III and PVP III. As members of PVM III, they may be deemed to share voting and investment powers with respect to the shares held by such funds. These principals disclaim beneficial ownership of all such shares except to the extent of their proportionate pecuniary interest therein.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Kevin Littlejohn</signatureName>
        <signatureDate>2004-12-21</signatureDate>
    </ownerSignature>
</ownershipDocument>

