Humanitarian corridors will open at 10:00 Moscow time (07:00GMT) on Saturday from the cities of Mariupol and Volnovakha.
A ‘regime of quietness’ will be implemented for the civilian population to leave the cities and has been agreed with the Ukrainian authorities, the defence ministry was quoted as saying.
The head of the Donetsk region military administration in Ukraine, Pavlo Kirilenko, confirmed the agreement.
He said his administration is currently working on the details of the evacuation.
The move is the first breakthrough in allowing civilians to escape the war, which has already claimed hundreds of lives in 10 days of fighting.
The head of Ukraine’s security council, Oleksiy Danilov, had called on Russia to create humanitarian corridors to allow children, women and the elderly to leave, calling such corridors ‘question No 1’.
Over a million people have already fled Ukraine to neighbouring countries such as Poland and Slovakia.
Mariupol is a major port city which has come under heavy attack in recent days.
The mayor has been appealing to allow people to leave amid a ‘blockade’ by Russian forces. He said Putin’s troops have cut off electricity, water, food and heating.
There has also been heavy fighting in Volnovakha.
Charities have been calling for the creation of humanitarian corridors, warning the situation is getting worse everyday.
There are fears of a brewing hunger crisis as supplies are cut off in areas that have come under heavy bombardment. The UN World Food Programme says millions of people inside Ukraine, a major global wheat supplier, will need food aid ‘immediately’.
As Russian forces batter strategic locations, Ukrainian President Volodymyr Zelensky has lashed out at Nato for refusing to impose a no-fly zone over his country, warning that “all the people who die from this day forward will also die because of you”.
Nato says a no-fly zone could provoke widespread war in Europe with nuclear-armed Russia.
But as the United States and other Nato members send weapons for Kyiv and more than one million refugees spill through the continent, the conflict is already drawing in countries far beyond Ukraine’s borders.