NAIROBI, Kenya — When U.S. Secretary of State Mike Pompeo landed in Ethiopia as part of his first foray into sub-Saharan Africa, he arrived in a city shaped by the same adversary that he had come to preach against: China.

Mr. Pompeo and his delegation were received on Monday night at the Bole International Airport, one of Africa’s biggest, expanded in part by Chinese funds. His entourage passed through the capital, Addis Ababa, where Beijing has built highways and factories, and financed a metro system and a multibillion dollar railway to neighboring Djibouti.

On Tuesday, Mr. Pompeo met the chairman of the African Union at its towering headquarters, built and paid for by China at a cost of $200 million.

Almost two years since President Trump named him America’s top diplomat, Mr. Pompeo has traveled to Africa to convince its leaders to shun Chinese investments and, instead, look to Washington and American companies for collaboration.