"He is being interrogated on his mission in the country. We have reason to believe he has terrorism links (with al-Shabaab)," the official said on condition of anonymity.
Police spokesman Eric Kiraithe confirmed the arrest but declined to provide any further details.
The senior officer said police were seeking to determine if the suspect had links with a wanted German national who is believed to have entered Kenya illegally and could have information "on planned al-Shabaab criminal activities".
The Swedish embassy in Nairobi could not be immediately reached for comment and a spokesperson at the foreign ministry in Stockholm declined to comment on the report..
"I've seen the media reports, but the foreign ministry hasn't received any official information on the case," Catarina Axelsson, a spokesperson with the Swedish foreign ministry, told the Expressen newspaper.
According to Kenyan news website Standardmedia.co.ke, the man is believed to have overstayed his visa and neglected to renew it.
“He has been charged with being illegally in the country and we intend to ask the courts to fine him before he is deported,” Kiraithe told the Kenyan news site.
The Swede is suspected of having ties to a German national wanted by police in Kenya who reportedly also planned to join al-Shabaab.
“He cannot account some of his time here and there are fears he may have gone to Somalia and came back to recruit more foreigners,” a senior police official who asked not to be named told Standardmedia.co.ke.
Al-Shabaab is an al-Qaeda-linked militia has waged a years-long insurgency against Somalia's weak, western-backed transitional government and controls much of the south and centre of the Horn of Africa country.
The man later turned out not to be Swedish at all but hailing from Switzerland.