Two of the four Indians had earlier taken to Twitter seeking Ms Swaraj's intervention for their release. One of them, Viyas Yadav, had said that they were caught by the Nigerian authorities and were kept in Lagos for the past three months.
"I am happy to inform that we have secured the return of Capt Atul Sharma, Sudhir Kumar, Balvinder Singh and Viyas Yadav to India. I appreciate the efforts of B N Reddy, Indian High Commissioner in Nigeria. We thank Nigerian authorities for their help," Ms Swaraj tweeted.
Mr Sharma and Mr Kumar are from Himachal Pradesh.