s6y Marathon Petroleum Corp S-4

Marathon Petroleum Corp S-4, filed Apr 5, 2019: Consent of experts

Exhibit 23.2

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” and to the use of our report dated February 21, 2018, with respect to the consolidated financial statements of Andeavor included in its Annual Report (Form 10-K) for the year ended December 31, 2017, filed with the Securities and Exchange Commission, and incorporated by reference in the Registration Statement (Form S-4) of Marathon Petroleum Corporation.

/s/ ERNST & YOUNG LLP

San Antonio, Texas

April 5, 2019