The attacks were prompted by the death of a local teenager due to a drug overdose. His parents blame Nigerian students for giving him the drugs.
Five Nigerian students were attacked on Monday by crowds, while another was beaten by a mob inside a shopping mall.
Police say five people have been arrested over the attacks.
Ms Swaraj said she had spoken to Uttar Pradesh Chief Minister Yogi Adityanath, and he had assured her of a "fair and impartial investigation into this unfortunate incident".
The attack on the student inside a popular shopping mall in Noida was recorded on mobile phone cameras by other shoppers and widely circulated on social media.
The victim told Indian reporters he had been beaten with rods, bricks and knives. He said that no one had helped or even called the police.
The reactions have been mostly those of shame and outrage.
Alkahba Solomon, a student in Noida, told the BBC that the situation was not "favourable for Nigerian students".
"Everybody is indoors. But the problem we are having right now is some of the landlords are telling African students to vacate from their house. These are the problems," he said.
Meanwhile, the Association of African Students of India has asked African students in Noida to stay at home and not attend classes on Tuesday.
There was a spate of attacks on African nationals living in India last year, including one in which a Congolese man was beaten to death in Delhi.