Mr. Navalny was detained before he reached the several thousand demonstrators gathered in Pushkin Square in central Moscow and other main avenues closer to the Kremlin. Video footage showed police officers, who had otherwise been restrained, knocking him to the ground and dragging him onto a bus.
A police statement, which put the size of the gathering at 1,000 people, said he would be charged with organizing an illegal gathering.
Last June, Mr. Navalny was arrested as he emerged from his apartment to attend an unauthorized anti-corruption protest, and he served 25 days in jail. This time, he initially declined first stayed in an undisclosed location, taunting the authorities by saying he would announce his whereabouts, and then giving the address where Mr. Putin is registered to vote.
After he was detained, Mr. Navalny posted a message on Twitter urging protesters to carry on without him.
The boisterous crowd in Pushkin Square chanted slogans including “These are not elections!” and “Down with the czar!” At one point, they urged more people to join them, chanting, “There is still time to come, the weather is not bad.”
Mr. Navalny organized anti-corruption protests across Russia in March and June, mobilizing, in particular, middle-class youths, and his campaign has vowed to organize repeated protests before the March 18 election to underscore that the elections are a fraud, with the Kremlin manipulating the entire process.
For his part, Mr. Putin has refused to even say Mr. Navalny’s name, warning that protest movements would only bring chaos to Russia.
The demonstrations on Sunday had a moderate turnout, drawing hundreds in many places, and were generally peaceful, although scattered arrests were reported. In the far eastern part of the country and in Siberia, they were held despite frigid temperatures, with Yakutsk approaching minus 50 degrees Fahrenheit (minus 45 degrees Celsius).
In Moscow and St. Petersburg, Russia’s two largest cities, law enforcement officials had warned that they would crack down on gatherings they considered to be illegal.
About 2,000 people demonstrated in St. Petersburg, according to the local news website Fontanka.ru. In Moscow, dozens of police buses lined Tverskoy Boulevard, one of the capital’s main thoroughfares, where protesters first gathered.
The news broadcasts on state television seemed to ignore the protests entirely.
Earlier, Mr. Navalny posted on Twitter a photograph of police taking a saw to the door of his headquarters in order to interrupt a live webcast describing events around the country. The police said that they were responding to reports of a bomb in the headquarters, Mr. Navalny said.
The website posted video footage of the police arresting one of the anchors of the newscast, but two Navalny campaign workers continued the broadcasts from an undisclosed location.
Mr. Navalny, who has made a name for himself as an anti-corruption campaigner, finds himself on one side of a dispute over whether opponents of Mr. Putin should boycott the vote or exercise their right, even if no other candidate stands a chance of winning.
“Russia has matured to the stage for elections to take place not as a production with Putin seeking pseudo-opponents and everyone goes out an performs,” Vladimir Milov, an opposition figure supporting the boycott, said during a debate on the Echo of Moscow radio station.
Maksim Kats, an opposition politician from one of Moscow’s district councils, countered that voting was crucial, even if the outcome was known.
“I think that the most appropriate means is to vote for the candidate that suits you,” he said. “But even if not, then at least spoil the ballot. And vote against Putin.”
Even among the protesters, there was support for this position, with one man yelling out, “Don’t support the boycott, you will be helping Putin if you do!”
Some political analysts suggested that the boycott was a poor tactic. The absence of Mr. Navalny’s supporters at the polls would most likely not be enough to make a significant difference in the turnout, which is already expected to be lower than usual. The lack of intrigue in the race is expected to hobble the effort to muster a record turnout for him.
But the Russian president has long shown a distaste for elections and for campaigning.
Mr. Putin has been the most powerful man in Russia since 2000, governing as president for all but a four-year stretch when term limits forced him to serve as prime minister for one term. Another presidential term, which would run six years, until 2024, would make him the longest-serving leader since Stalin.
There is no obvious successor, but many expect Mr. Putin to try to manipulate the Constitution to continue to play a significant role in the leadership of Russia, even if outside the presidency.