Police said they made 25 arrests at the demonstration, RIA Novosti reported. It was organized by Dmitri Demushkin, a former skinhead and neo-Nazi whose organization is banned by the government.
The detainees were held for several hours and freed after a "prophylactic conversation," police said.
Several hundred people joined the rally in Pushkin Square. Demushkin put the number at 200 and said police had made far more arrests than they reported.
The proposed legislation would apply to people born in Russia whose parents are foreigners and to citizens of former Soviet republics whose parents were native Russians.
"The law involves 100 million people and we, as Russian nationalists, are naturally against it," Demushkin told RIA Novosti.
Russia has a population of about 143 million. Before its 1991 breakup, the Soviet Union had a population of close to 300 million.
Celebrity Families of 2014 [PHOTOS]