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

    <schemaVersion>X0206</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2014-02-04</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0001457612</issuerCik>
        <issuerName>GENOCEA BIOSCIENCES, INC.</issuerName>
        <issuerTradingSymbol>GNCA</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001591747</rptOwnerCik>
            <rptOwnerName>Bitterman Kevin</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O POLARIS VENTURE PARTNERS</rptOwnerStreet1>
            <rptOwnerStreet2>1000 WINTER STREET, SUITE 3350</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable></nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Seed Preferred Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>178731</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Series A Preferred Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>705356</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Series B Preferred Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>391666</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Series C Preferred Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>510516</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Warrant to purchase Series A Preferred Stock</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F6"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F6"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F6"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Series A Preferred Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>399909</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnotes</value>
                    <footnoteId id="F2"/>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                    <footnoteId id="F5"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The Seed Preferred Stock, Series A Preferred Stock, Series B Preferred Stock and Series C Preferred Stock are each convertible into common stock at any time at the holder's election and upon the consummation of a qualified public offering of the registrant.  There is no expiration date for any series of preferred stock. The Series B Preferred Stock has an accruing cumulative dividend that accrues at a rate of 8% per year from the Series B Preferred Stock issuance date.  Upon the anticipated closing of the registrant's initial public offering, approximately 98,808 shares of common stock will be issued in connection with the Series B Preferred Stock accruing cumulative dividend.</footnote>
        <footnote id="F2">172,465 shares of Seed Preferred Stock, 680,623 shares of Series A Preferred Stock, 377,934 shares of Series B Preferred Stock, 492,615 shares of Series C Preferred Stock and warrants exercisable for 385,887 shares of Series A Preferred Stock are owned directly by Polaris Venture Partners V, LP (&quot;PVP-V&quot;); 3,361 shares of Seed Preferred Stock, 13,265 shares of Series A Preferred Stock, 7,365 shares of Series B Preferred Stock, 9,601 shares of Series C Preferred Stock and warrants exercisable for 7,520 shares of Series A Preferred Stock are owned directly by Polaris Venture Partners Entrepreneurs' Fund V, L.P. (&quot;PVP-E&quot;); 1,181 shares of Seed Preferred Stock, 4,662 shares of Series A Preferred Stock, 2,588 shares of Series B Preferred Stock, 3,374 shares of Series C Preferred Stock and warrants exercisable for 2,643 shares of Series A Preferred Stock are owned directly by Polaris Venture Partners Founders' Fund V, L.P. (&quot;PVP-F&quot;).</footnote>
        <footnote id="F3">1,724 shares of Seed Preferred Stock, 6,806 shares of Series A Preferred Stock, 3,779 shares of Series B Preferred Stock, 4,926 shares of Series C Preferred Stock and warrants exercisable for 3,859 shares of Series A Preferred Stock are owned directly by Polaris Venture Partners Special Founders' Fund V, L.P. (&quot;PVP-S&quot; and, together with PVP-V, PVP-E and PVP-F, the &quot;Polaris Funds&quot;). North Star Venture Management 2000, LLC directly or indirectly provides investment advisory services to various venture capital funds, including the Polaris Funds. Jonathan Flint and Terrance McGuire, managing members of North Star Venture Management 2000, LLC, exercise voting and investment power with respect to North Star Venture Management 2000, LLC. Each of the Polaris Funds has sole voting and investment power with respect to the shares of the registrant held by the applicable Polaris Fund.</footnote>
        <footnote id="F4">The respective general partners of the Polaris Funds may be deemed to have sole voting and investment power with respect to the shares held by such funds. The respective general partners disclaim beneficial ownership of all the shares held by the Polaris Funds, and this report shall not be deemed an admission of beneficial ownership of such shares for purposes of Section 16 or for any other purpose, except to the extent of their proportionate pecuniary interests therein. The members of North Star Venture Management 2000, LLC (the &quot;Polaris Management Members&quot;) are also members of Polaris Venture Management Co. V, L.L.C. (the general partner of each of the Polaris Funds). Jonathan Flint and Terrance McGuire, managing members of Polaris Venture Management Co. V, L.L.C., exercise voting and investment power with respect to Polaris Venture Management Co. V, L.L.C.</footnote>
        <footnote id="F5">As members of the general partner and North Star Venture Management 2000, LLC, the Polaris Management Members may be deemed to share voting and investment powers for the shares held by the Polaris Funds. The Polaris Management Members disclaim beneficial ownership of all such shares and this report shall not be deemed an admission of beneficial ownership of such shares for purposes of Section 16 or for any other purpose, except to the extent of their proportionate pecuniary interests therein. Kevin Bitterman, a director of the registrant, has an assignee interest in Polaris Venture Management Co. V, L.L.C. To the extent that he is deemed to share voting and investment powers with respect to the shares held by the Polaris Funds, Dr. Bitterman disclaims beneficial ownership of all such shares and this report shall not be deemed an admission of beneficial ownership for the purposes of Section 16 or for any other purpose except to the extent of his proportionate pecuniary interest therein</footnote>
        <footnote id="F6">The warrants to purchase Series A Preferred Stock are exercisable at any time at the holder's election, and have an expiration date on the later of February 11, 2014 or the consummation of an initial public offering of the registrant.</footnote>
    </footnotes>

    <remarks>Exhibit ListExhibit 24 - Power of Attorney</remarks>

    <ownerSignature>
        <signatureName>/s/ Robert E. Farrell, Jr., as attorney-in-fact for Kevin Bitterman</signatureName>
        <signatureDate>2014-02-04</signatureDate>
    </ownerSignature>
</ownershipDocument>
