Riot police in central Moscow were picking protesters out of the crowd at random.
Opposition leader Alexei Navalny was detained at his home ahead of the protests, according to his wife.
Thousands of supporters have heeded his call to take to the streets of Moscow and other Russian cities.
OVD-Info, an independent NGO, told Russian media that 600 people had been detained at the Moscow protest.
Police in Moscow say about 5,000 took part in the demonstration there, Interfax news agency reports.
Russia's interior ministry says that about 3,500 people attended the protest in St Petersburg, and 500 were detained.
"Alexei [Navalny] has been arrested in the entrance to our block of flats," Yuliya Navalnaya wrote on Twitter, ahead of the demonstration.
Mr Navalny, who intends to stand for the Russian presidency next year, had been due to attend the unauthorised rally in central Moscow.
In a live broadcast by the Russian liberal TV channel, Dozhd, protesters in St Petersburg could be heard shouting "shame" as they were detained by police. Among those arrested was Maxim Reznik, the city's legislative assembly deputy.
Prominent activist Daniil Ken said he was arrested as he left his home in St Petersburg. He urged people to join the rally at the city's Champ de Mars square. "Go for me, please!" he tweeted. He has since been released.
Police had earlier detained several people at demonstrations in the cities of Vladivostok, Blagoveshchensk and Kazan.
What are the protests about?
Mr Navalny called on Russians to take to the streets on Monday - Russia Day - to express their anger at alleged corruption at the highest levels.
The anti-corruption campaigner uses YouTube, tweets and blogs to reach new audiences.
A video posted in March accuses Russian Prime Minister Dmitry Medvedev of accumulating a vast private fortune. Mr Medvedev denies the claims. The video, which includes the accusation that the PM has a duck house on one of his properties, has been viewed nearly 23 million times.
In a call for people to join him on Monday, Mr Navalny wrote: "I want changes. I want to live in a modern democratic state and I want our taxes to be converted into roads, schools and hospitals, not into yachts, palaces and vineyards."
Mr Navalny was earlier granted permission to hold a rally at Sakharova Avenue but changed the location - without permission - on the eve of the demonstration to Tverskaya Street, near the Kremlin.
The protest was called over government plans to demolish Soviet-era apartment blocks in the city.
This woman draped herself in the colours of the Russian flag
Permission was granted for demonstrations in 169 locations across the country, some of which were broadcast live on the Navalny Live YouTube channel.
The protests coincided with a series of official events - including festivals, concerts and military enactments - taking place across the country to mark Russia Day, the national holiday dedicated to the 1990 declaration of sovereignty.
Similar rallies led by Mr Navalny in March led to hundreds of arrests.
Those protests were the largest since 2012, drawing thousands of people - including many teenagers - to rallies nationwide, angered by a report published by Mr Navalny that accused Prime Minister Dmitry Medvedev of corruption.