"We must uphold the principle that the people of the Middle East are the masters of their own affairs, oppose external interference (and) support regional countries in strengthening dialogue on peace and security," Xi told Egyptian President Abdel Fattah al-Sisi, according to Chinese state news agency Xinhua.
Xi is on his first visit to Egypt in a decade as Beijing seeks a greater foothold in the region against the backdrop of the US-Iran war.
Washington vowed last month to isolate Iran economically, threatening expanded sanctions that could also hit Chinese banks, among others.
China, a major buyer of Iranian oil, has vowed to safeguard its interests.
Xi also said during talks with Sisi that Beijing was willing to help protect maritime shipping from the energy-rich region, upended since US-Israeli strikes on Iran in late February triggered the war.
"China stands ready to work with countries in the region to safeguard the security of international shipping lanes, advance development cooperation... and eliminate the breeding grounds for conflict," Xi said, according to Xinhua.