EXHIBIT 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
June 24, 2026
To the Participants and Plan Administrator
Marathon Petroleum Thrift Plan
We consent to the incorporation by reference in Registration Statement Nos. 333-212956, 333-175245, and 333-248128 of Marathon Petroleum Corporation on Form S-8 of our report dated June 24, 2026, appearing in this Annual Report on Form 11-K of the Marathon Petroleum Thrift Plan as of, and for the year ended, December 31, 2025.
/s/ GJC CPA’S & ADVISORS
Cincinnati, Ohio