Authorities said Navalny would be charged with organising an unpermitted protest, adding he had been taken to a police station.
Navalny's lawyer, Olga Mikhailova, told Reuters that her client had been released without charge but would have to face court at a later date.
If charged with violating laws on holding demonstrations, Navalny could face up to 30 days in jail.
The opposition leader urged Muscovites not to give up.
"You are not rallying for me, but for yourselves and your future," he tweeted.
'Down with the czar'
About 4,000 people turned up for the unsanctioned rally in Moscow, with many chanting "Down with the czar" and brandishing placards saying "Voters' strike."
Authorities beefed up security, dispatching police vans and passenger buses to the city centre, but police largely refrained from arresting protesters. A crowd of protesters was later allowed to walk down to Red Square.
One group of protesters walked several kilometres and reached the government headquarters as police watched on.
Authorities estimated the Moscow turnout at around 1,000 people.
Ahead of the Moscow rally police broke into Navalny's headquarters using a power saw, interrupting a live broadcast covering protests in the east of the country.
Police also detained several members of Navalny's team.
More than 250 people were detained across the country, according to OVD-Info, an independent monitor.
Sunday's turnout paled in comparison to last year's protests when tens of thousands demonstrated against corruption among Russia's elite in March and June, 2017.
Police unleashed a severe crackdown afterwards, arresting more than 1,000 people including schoolchildren.
Navalny himself served three jail sentences of 15 days, 25 days and 20 days for organising unauthorised protests last year.
But many protesters said Sunday authorities would not intimidate them.
"These are not elections because we already know the result," Elena Ruzhe, 62, told AFP in Moscow.
"I'm not scared to protest," added the former culture ministry worker.
Protester Alexandra Fedorova, who wore a fur coat, said it was wrong not to let Navalny take part in the vote.
"I don't see a future. There is nobody to vote for," the 27-year-old said.
'I want change'
Protesters expressed similar sentiments in the second city of Saint Petersburg where around 1,500 people rallied, some chanting "Russia without Putin" and "Putin is a thief."
"I want change," Andrei Petrov, 20, told AFP in the former imperial capital. "We are tired of living in this quagmire."
Earlier in the day opposition supporters protested in far eastern Russia and Siberia, including in the northern city of Yakutsk where people rallied despite temperatures of around minus 45 Celsius (minus 49 Fahrenheit).
In the Ural city of Yekaterinburg, around 1,000 people turned up, with the city's mayor joining the crowd.
"What we are being offered now is not an election," the outspoken mayor, Yevgeny Roizman, told the gathering.
Navalny -- seen as the only politician with enough stamina to take on Putin -- has built a robust protest movement, tapping into the anger of a younger generation yearning for change.
He says the upcoming election will be little more than a coronation of Putin who is expected to win a fourth presidential term, becoming the longest-serving Russian leader since Stalin.
Putin's spokesman Dmitry Peskov warned unsanctioned rallies would lead to "certain consequences" -- a thinly-veiled promise of punishment.
Last year Navalny mounted a forceful bid to run for president but officials ruled him ineligible due to a criminal conviction which he says is politically motivated.
Navalny has said he would use the full force of his campaign -- including over 200,000 volunteers -- to organise "voters' strikes" and encourage Russians to stay away from polling stations on election day.
After 18 years of leadership, both as president and prime minister, Putin fatigue is spreading across Russia.
But the post-Soviet turbulence of the 1990s remains deeply ingrained in Russia's collective psyche, making many reluctant to take to the streets, observers say.