It is not clear why the case is being brought in the United States. The FBI claims they are "real terrorists".
The 29-year-old's lawyer said that the defendants have not committed any crimes against America.
"American authorities believe that al-Shabaab, which has been designated as terrorists by the United States, propagates its activities on the internet and therefore 'affects American foreign trade'. In that case more or less anything falls within American jurisdiction," lawyer Ephraim Savitt told the TT news agency.
He confirmed that the Swedes were recruited by al-Shabaab but claims that they were on the run from the militant organization at the time of their arrest in Djibouti last summer.
According to the New York Times, the two Swedes and a 23-year-old man who was controversially stripped of his British citizenship this year were on their way to Yemen.
The men were extradited to the United States after a series of interrogations by FBI and others.
According to Savitt, the Swedish Foreign Ministry was notified already at the time of the arrest in Djibouti.
"But I am not aware of any specific efforts made by Swedish authorities," he said.
Representatives of the Swedish Consulate in New York have visited the Swedes on at least one occasion.
Both are of Somali origin and hold Swedish citizenship.
"I can't go into any detail about our conversation or what they asked for," said Charlotta Ozaki Macias, a Swedish Foreign Ministry spokeswoman.
The men appeared in the Brooklyn court together with the 23-year-old Brit. They were aided by a Swedish interpreter.
If found guilty, they could face up to 30 years in prison.
According to Over Bring, Professor Emeritus in public international law, countries can charge individuals who have committed crimes abroad if they are believed to jeopardize national interests.
Story continues below…
"It is a question of evidence, how concrete this threat against US security is and if it is a credible argument," Bring told TT.
"In today's climate, I can't help but suspect that this would work in an US court."
The men are accused of participating in weapons and explosives training with al-Shabaab during a four-year period beginning in 2008.
Court documents show no connection between the alleged crimes and the United States, the New York Times reported.
TT/The Local/nr Follow The Local on Twitter