Police said the detained man, Moroccan Abdelmajid Touil, had arrived in Italy on a migrant boat in February.
His alleged role in the attack in Tunis has not been made clear.
Tourists from Germany, Poland, Italy and Spain were among those killed when gunmen opened fire at the Bardo museum in March.
They stormed the building and took hostages. Two of the gunmen - identified by the authorities as Yassine Laabidi and Hatem Khachnaoui - were killed by security forces.
Islamic State has previously said it was behind the raid.
It is alleged that 22-year-old Mr Touil "participated indirectly in the attack, supporting the ones who carried it out", the Associated Press news agency quotes a Tunisian official as saying.
It is not clear whether he was in Italy or Tunisia at the time.
The Italian authorities say that Mr Touil first came to their attention in February when he arrived in the country illegally and he was told to leave.
In the days after the attack, Tunisian authorities arrested a number of people.
At the end of March, they claimed to have killed the alleged leader of the assault, Lokman Abu Sakhra.
Sally Adey, from the UK, was one of those killed. She was on an excursion from a cruise ship with her husband Robert who survived the attack.
Italian police have arrested a man suspected of being involved in the attack on Tunisia's national museum which killed 22 people in March.