Protesters held pictures of foreigners who were killed in the city over recent years, and chanted "End fascism!" One banner read: "Saint Petersburg is a cemetery for foreigners."
Georges Nounga, the friend of an African student killed last week, called on the crowd of protesters to join forces against xenophobia.
"I think there isn't a single country in Africa or in Latin America where Russians are killed simply because they are Russian. That doesn't happen anywhere," Nounga said.
"What should be done?" he asked, answering his own question by saying "we must engage in dialogue, we must show that we are not satisfied."
Lamzar Samba, a communications student from Senegal, was shot dead on April 7 as he and a group of African students were leaving a night club in the center of St. Petersburg where they had been celebrating their university's faculty day. Police said they found a hunting gun emblazoned with a swastika near the scene.
On April 10, a 28-year-old St. Petersburg resident was detained in connection with the killing.
Samba's killing was the latest in a slew of racist attacks in St. Petersburg. According to the nongovernmental organization Sova, 14 people have been injured and two killed in racially motivated attacks in the city this year.