The operation was carried out by police near the border town of Ahfir, about 30 kilometres north of Oujda, according to a statement from the Interior Ministry, which did not give a date for the arrest.
The Algerian national, whose identity was not revealed, was "in possession of large quantities of dangerous substances" and his arrest also led to the discovery of firearms, it said.
"The suspect was accompanied by another person, whose identity is the subject of investigation," the statement added.
Jund al-Khilafa, (Soldiers of the Caliphate) -- who have pledged allegiance to the Islamic State group -- last year claimed responsibility for kidnapping and killing Herve Gourdel, a 55-year-old mountain guide in the Djurdjura ranges southeast of Algiers.
The Algerian army mobilised some 3,000 troops in the search for the Frenchman's body and eventually found it earlier this month after a tip-off from a suspected militant being held in custody.
Gourdel's remains will be transferred to France on Monday.
At least six jihadis have also been killed, including the leader of Jund al-Khilafa, Abdelmalek Gouri, who the army said it had killed in December.
In November Morocco announced the arrest of six men in the region of Berkane, near Oujda, for making a video in which they announced "the appearance of Jund al-Khilafa" in the kingdom.
The long common border between Algeria and Morocco has been officially closed for more than 20 years owing to persistent diplomatic disputes.
However, it is still the site of various forms of contraband trafficking.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.