At least 260,000 have been displaced within Ukraine, the agency said, adding that Moscow had reported another 260,000 people have sought asylum in Russia.
The total of 540,000 outstripped the 387,000 issued by UNHCR two weeks ago, also split roughly equally between Ukraine and Russia.
UN refugee chief Antonio Guterres warned of dire consequences if the spiralling crisis in eastern Ukraine, which has killed more than 2,600 people since mid-April, is allowed to continue.
"If this crisis is not quickly stopped, it will have not only devastating humanitarian consequences, but it also has the potential to destabilize the whole region," Guterres said in a statement.
"After the lessons of the Balkans, it is hard to believe a conflict of these proportions could unfold on the European continent," he added.
As pro-Russian rebels allegedly backed with Moscow's manpower and weaponry open a new front in the southeast, there are fears that the exodus will accelerate.
The total figure of Ukrainians who have spilled out of their battle-torn communities remains hazy, but could well be much higher.
"This is the visible tip of the iceberg," said UNHCR's Europe director Vincent Cochetel.
"It's safe to say that you have over a million people displaced by this conflict," he told reporters after the figures were released.
Many of those remaining in Ukraine after fleeing the east of the country — where government troops are battling pro-Russian separatists who seized entire cities — have not registered with the authorities.
Cochetel said 260,000 was a "low estimate".
"People tend to stay with relatives, people don't see the benefits sometime of registering with the local authorities because they don't receive assistance automatically," he said.
Fear of draft, retaliation
Military-age men who flee the conflict zone fear being drafted and sent back to fight, which discourages registration, said Cochetel.
"Some people also fear that there could be some retaliation if they return later on to where they fled from, so they don't want it to be known that they have left their cities," he added.
An estimated 2.2 million people remain in conflict zones such as Donetsk and Lugansk, UNHCR said, but the number of people fleeing through three "corridors" was falling after civilians were killed escaping.
With the embattled communities facing dwindling access to food and water, UNHCR said it planned a mission to Lugansk this week.
Some exiles have headed home, with 20,000 people returned to Slavyansk, which government troops retook in July, UNHCR said.
UNHCR said that according to Moscow, a total of 814,000 Ukrainians have entered Russia since January under a visa-free deal between the two former Soviet republics.
Even if only one-third have applied for formal asylum status or resettlement rights, the remaining half million "aren't tourists", said Cochetel.
Most stay with family or find private accommodation, UNHCR said.
Tens of thousands of Ukrainians are also thought to have headed westwards, either to the European Union or former Soviet republics such as Belarus.
Again, asylum figures do not reflect reality, officials said.
Almost 15,000 are estimated to have gone to Poland, which has received 1,082 asylum requests, the highest number in the EU.
Another 20,000 are thought to have gone to EU member Estonia, and a similar number to Belarus.