<SUBMISSION>
<ACCESSION-NUMBER>0001126975-19-000173
<TYPE>4
<PUBLIC-DOCUMENT-COUNT>1
<PERIOD>20191114
<FILING-DATE>20191118
<DATE-OF-FILING-DATE-CHANGE>20191118
<REPORTING-OWNER>
<OWNER-DATA>
<CONFORMED-NAME>Methvin Stacy P.
<CIK>0001582574
</OWNER-DATA>
<FILING-VALUES>
<FORM-TYPE>4
<ACT>34
<FILE-NUMBER>001-16335
<FILM-NUMBER>191227579
</FILING-VALUES>
<MAIL-ADDRESS>
<STREET1>5205 N O'CONNOR BLVD.
<STREET2>SUITE 200
<CITY>IRVING
<STATE>TX
<ZIP>75039
</MAIL-ADDRESS>
</REPORTING-OWNER>
<ISSUER>
<COMPANY-DATA>
<CONFORMED-NAME>Magellan Midstream Partners, L.P.
<CIK>0001126975
<ASSIGNED-SIC>4610
<IRS-NUMBER>731599053
<STATE-OF-INCORPORATION>DE
<FISCAL-YEAR-END>1231
</COMPANY-DATA>
<BUSINESS-ADDRESS>
<STREET1>ONE WILLIAMS CENTER, MD 28-1
<CITY>TULSA
<STATE>OK
<ZIP>74172
<PHONE>918 574 7000
</BUSINESS-ADDRESS>
<MAIL-ADDRESS>
<STREET1>ONE WILLIAMS CENTER, MD 28-1
<CITY>TULSA
<STATE>OK
<ZIP>74172
</MAIL-ADDRESS>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>MAGELLAN MIDSTREAM PARTNERS, L.P.
<DATE-CHANGED>20190718
</FORMER-COMPANY>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>MAGELLAN MIDSTREAM PARTNERS LP
<DATE-CHANGED>20030827
</FORMER-COMPANY>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>WILLIAMS ENERGY PARTNERS L P
<DATE-CHANGED>20001024
</FORMER-COMPANY>
</ISSUER>
<DOCUMENT>
<TYPE>4
<SEQUENCE>1
<FILENAME>wf-form4_157411092848684.xml
<DESCRIPTION>FORM 4
<TEXT>
<XML>
<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2019-11-14</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001126975</issuerCik>
        <issuerName>Magellan Midstream Partners, L.P.</issuerName>
        <issuerTradingSymbol>MMP</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001582574</rptOwnerCik>
            <rptOwnerName>Methvin Stacy P.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>ONE WILLIAMS CENTER</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>TULSA</rptOwnerCity>
            <rptOwnerState>OK</rptOwnerState>
            <rptOwnerZipCode>74172</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>
        <derivativeTransaction>
            <securityTitle>
                <value>Phantom Units</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2019-11-14</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>125</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>60.28</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F2"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Units</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>125.0</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>7525</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Each phantom unit is the economic equivalent of one common unit.</footnote>
        <footnote id="F2">The phantom units become payable in cash or common units upon the reporting person's termination of service as a director in accordance with the terms of the Director Deferred Compensation Plan.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Stacy P. Methvin</signatureName>
        <signatureDate>2019-11-18</signatureDate>
    </ownerSignature>
</ownershipDocument>
</XML>
</TEXT>
</DOCUMENT>
</SUBMISSION>
