Police spokesman Henry Cisse was quoted by Reuters saying an operation in Dakar on Thursday had led to the arrest of Ould Sidy Mohamed Dina, a Malian, as he was trying to leave his home. He had been in Senegal for a month, he said.
Another suspected jihadist, whom he did not name, from Mauritania, had been arrested trying to board a bus to Gambia.
Following attacks on foreigners in neighboring Burkina Faso and Mali last year, Security analysts say Senegalese capital Dakar is an obvious next hit because of its popularity with expats.
Senegal is a beacon of peace and stability in West Africa and a strong economy in the region but it also shares a border with Mali, where AQIM is principally based in the Sahara Desert.
Experts worry that despite international assistance, particularly from France and the United States, regional cooperation and intelligence gathering are too weak to catch the spread of militancy or halt attack plans.
President Macky Sall has warned that extremism has no place in his nation, where Muslims and Christians coexist peacefully.