Democrat Mr Obama was favoured by a four-to-one margin across the 22,500 people polled in 22 countries.
In 17 countries, the most common view was that US relations with the rest of the world would improve under Mr Obama.
If Republican Mr McCain were elected, the most common view was that relations would remain about the same.
The US public was polled separately and Americans also believed an Obama presidency would improve US ties with the world more than a McCain presidency.
Forty-six per cent of Americans expected relations to get better if Mr Obama were elected and 30% if Mr McCain won the White House.
A similar poll conducted for BBC World Service ahead of the 2004 US presidential election found most countries would have preferred to see Democratic nominee John Kerry beat the incumbent George W Bush.
At the time, the Philippines, Nigeria and Poland were among the few countries to favour Mr Bush's re-election. All three now favour Mr Obama over Mr McCain.