Ukraine will not allow Russian men aged 16-60 into the country following the imposition of martial law, Kiev says.
An exception would be made for "humanitarian cases" such as those travelling to funerals. Russia says it is not planning retaliatory measures.
Martial law has been imposed in 10 Ukrainian regions until 26 December.
This came as Ukraine's president voiced fears of a Russian invasion after Russian forces fired on and seized three Ukrainian boats and 24 sailors.
Ukraine said Sunday's incident in the Black Sea was a flagrant violation of international law, while Russia says the vessels violated its territorial waters.
It is the most dangerous clash at sea off Crimea since Russia annexed the peninsula from Ukraine in March 2014.
What did Ukraine say?
The restrictions were announced after President Petro Poroshenko met the country's top security officials, including border guard chiefs, in Kiev.
The president tweeted (in Ukrainian) that the ban was designed to prevent the formation of "private armies" in Ukraine.
He was referring to Russian-backed separatists who formed units in April 2014 to fight Ukrainian government forces in eastern Ukraine.
Mr Poroshenko also said registration criteria would be tightened for Russian citizens in the regions under martial law.
On Tuesday, he warned there was a threat of "full-scale war" with Russia.
"The number of [Russian] tanks at bases located along our border has grown three times," the president said.
Five of the 10 regions border Russia while two are adjacent to Moldova's breakaway Trans-Dniester region, where Russian troops are stationed. The other three regions border the Black Sea or Sea of Azov close to Crimea.
The BBC's Jonah Fisher in Kiev says the ban could have a devastating impact on cross-border travel as the holiday period approaches. Many Russians have relatives living in Ukraine.
Reacting to the Ukrainian ban, Russian Foreign Ministry spokeswoman Maria Zakharova said Moscow was not planning "mirror" measures as this "could result in full madness".
Russia earlier said the 30-day martial law in Ukraine had been declared in order to potentially suspend presidential elections set for 31 March.
It said President Poroshenko - whose approval ratings have plummeted - would then be the main beneficiary.
Mr Poroshenko denies the claim, saying the polls will be held as scheduled.
Religious tensions
Ukraine's SBU state security service has searched the property of a senior Russian-backed Orthodox priest in Voronkiv, a village about 50km from Kiev.
The SBU said Metropolitan Pavel was suspected of inciting religious hostility.
He is father-superior of Kiev-Pechersk Lavra monastery, one of the most revered sites in Orthodox Christianity. He told journalists that he was resident at the monastery, not in Voronkiv.
He admitted criticising Filaret, leader of the Kiev Patriarchate, but denied fomenting religious hostility.
The branch of the Ukrainian Orthodox Church loyal to Filaret has been recognised as independent by the Constantinople Patriarchate, Orthodox Christianity's highest authority.
The dispute has soured centuries-old ties between Ukrainian and Russian clergy and exacerbated Kiev-Moscow tensions.
How will the Ukrainian ban be policed?
Stricter checks are now expected at border crossings. Although the ban applies to all points of entry into Ukraine, the main focus is likely to be on the nearly 2000km Ukrainian-Russian land border.
Soon after the conflict began in 2014, Ukraine started building a "wall" - a system of fortifications along the border. However, the project is still unfinished due to lack of funds.
To further complicate the matter, hundreds of kilometres of Ukraine's border are de facto controlled by Russia and pro-Russian separatists in the east.
Meanwhile, checkpoints have been set up between Ukraine and Russian-annexed Crimea in the south and also on the line of separation between Ukraine and two self-proclaimed rebel republics in the east.
And even before Friday's ban, Ukraine had already put restrictions on Russian nationals wanting to visit Ukraine. A number of them have been deported for failing to explain the purpose of their visit, Ukraine says.
Russian nationals - as well as other foreigners - are routinely denied entry into Ukraine if they have visited Crimea or the self-proclaimed republics not via Ukrainian-controlled points of entry.
Kiev has also stopped direct flights between Ukraine and Russia.
What about the captured Ukrainian sailors?
A court in Crimea later ordered the Ukrainians to be detained for 60 days, despite an international outcry.
US President Donald Trump cancelled a planned meeting at the G20 summit in Argentina with his Russian counterpart Vladimir Putin over the issue.
The sailors are accused of illegally crossing into Russia. They are not treated by Russia as prisoners of war.
On Friday, Crimea's human rights ombudsman Lyudmila Lubina said the captured servicemen had been transferred from Crimea to Moscow, Russian media report.
- BBC