Police believe the suspect is former journalist Hassan Hanafi, who is accused of killing journalists in Somalia, other sources said.
However, the man has denied under interrogation that he is Mr Hanafi, the sources added.
Al-Shabab has carried out a spate of attacks in Somalia and Kenya.
Last September, 67 people were killed when the group’s fighters laid siege to the upmarket Westgate shopping centre in Kenya’s capital, Nairobi.
Somali security sources said Mr Hanafi was arrested a few days ago in Nairobi following co-operation between the intelligence services of the neighbouring states, reports the BBC’s Abdullahi Abdi from Nairobi.
Mr Hanafi was believed to have been in Kenya for medical treatment when police swooped on him, in a rare cross-border arrest of an al-Shabab suspect, our reporter says.
However, the man – still being interrogated by Kenya’s anti-terror squad – insists that he is the victim of a mistaken identity and should be released, our correspondent adds.
Mr Hanafi joined al-Shabab’s armed wing a few years ago after a stint with Radio Andalus, the group’s mouthpiece in Somalia, our reporter says.
Local journalists have long suspected that he is behind the killing of their colleagues, our reporter says.
About 20 journalists have been killed in Somalia over the past three years.