The 34-year-old man was taken to the hospital in the suburb of Kolpino. Two men aged 18 and 19 have been arrested in connection with the attack, the local police press service said.
The incident is the latest in a string of violent attacks on non-white foreigners in St. Petersburg in recent months.
A man from Mali was stabbed to death in St. Petersburg in February, following the murder of a student from Cameroon last December and of a Congolese student in September.
A jury Thursday cleared one man of the murder last September of nine-year Tajik girl Khursheda Sultonova, but convicted seven others of hooliganism. The brutal attack was widely seen as one of the worst racially motivated crimes in Russian history, but only one defendant was put on trial for murder, while the others were charged with assaulting Khursheda, her father and 11-year-old cousin.
Prosecutors said they would appeal the verdict.
Reports of routine attacks by skinheads and violent youths on foreigners with non-Slavic features have prompted Russian and foreign human-rights groups to raise concerns over the alarming spread of racist and xenophobic attitudes in the country.
The central city of Voronezh alone has seen at least seven apparently racially motivated killings over the past six years, including the murder of a Peruvian student in October last year.