WASHINGTON—The United Nations launched an urgent diplomatic effort to head off an expected United Arab Emirates assault on Yemen’s most important port in the coming days, fearing an attack could create a humanitarian disaster and derail the most promising push in years to end the conflict, people familiar with the talks said.

Aid groups and U.N. officials working in the Red Sea port city of Hodeidah are scrambling to get their international staff out after British officials warned them an attack on the city was imminent.

...