An Algiers judge placed Noureddine Bedoui, 62, under court supervision and confiscated his passport after his detention on Sunday, but on Tuesday another court decided to detain him.
Bedoui briefly served as prime minister in early 2019 after being appointed to replace unpopular premier Ahmed Ouyahia as streets across Algeria were rocked by unprecedented protests against Bouteflika's bid for a fifth term in office.
But Bouteflika's moves did little to placate anger, and just three weeks later he resigned under pressure from the public and the army, bringing an end to two decades of rule.
Ouyahia and fellow ex-premier Abdelmalek Sellal have both been handed long prison sentences on charges of corruption under Bouteflika.
Bouteflika died in September at the age of 84 and was quietly buried without the honours accorded to his predecessors.
Bedoui, who served for nearly four years as interior minister, was seen as an unwavering Bouteflika loyalist and was despised by the Hirak protest movement that toppled them both.
Following Bouteflika's fall, prosecutors launched a string of graft investigations against people in his close circle, which led to several other top figures receiving hefty prison sentences, including his powerful brother Said.