Please wait

Exhibit 23.4

DeGolyer and MacNaughton

5001 Spring Valley Road

Suite 800 East

Dallas, Texas 75244

April 27, 2026

Board of Directors

Ecopetrol S.A.

Carrera 13 No. 36-24

Bogota, D.C. Colombia

Ladies and Gentlemen:

We hereby consent to the references to DeGolyer and MacNaughton and to the inclusion of and information derived from our report of third party dated April 27, 2026, containing our opinions regarding our estimates, as of December 31, 2025, of the proved oil, condensate, natural gas liquids, gas, and oil equivalent reserves of certain properties that Ecopetrol S.A. has represented it holds in Colombia and the United States as set forth under the headings “3. Business Overview–3.5 Exploration and Production–3.5.3 Reserves,” “8. Financial Statements  34.4 Reserve information,” and “10. Exhibits” and as Exhibits No. 23.3 and 99.2 in the Annual Report on Form 20-F of Ecopetrol S.A. for the year ended December 31, 2025 (the Annual Report) and to the incorporation by reference of this consent and our report of third party into Ecopetrol S.A.’s registration statement on Form F-3 filed with the United States Securities and Exchange Commission on April 19, 2024 (the Registration Statement).

Very truly yours,

/s/ DeGolyer and MacNaughton

DeGOLYER and MacNAUGHTON

Texas Registered Engineering Firm F-716