PM Barre's announcement marks a sharp reversal of fortune for Muktar Robow, who has spent the last four years under house arrest after a falling-out with ex-president Mohamed Abdullahi Mohamed, better known as Farmajo.
Robow, 53, publicly Robow split from the group in 2013 and publicly denounced al Shabab when he came to the government side in 2017, with the United States government at one point offering a $5-million bounty for his capture.
"After consultations that took a period of more than 30 days... I'm very happy to present Somali men and women who I have selected based on their academic background, experience and fairness," Barre said.
"I'm expecting they will respond to the needs of the country."
Robow's new job sparked a flurry of hashtags on twitter crowing he had made it #FromPrisonertoMinister. He had been held under house arrest until recently.
His appointment could help strengthen government forces in his native Bakool region, where insurgents hold substantial amounts of territory but where Robow also commands support. Or it could fan flames with the region's president, who sees him as a political rival.
"We welcome his appointment. The move will advance reconciliation and will serve as a good example for more high level al-Shabab defections," said political analyst Mohamed Mohamud.
"Al Shabab members who might be thinking of surrendering ... can dream of serving their country at the highest levels."
New President Hassan Sheikh Mohamud, elected by lawmakers in May, has promised to take the fight to the insurgents after three years in which his predecessor, consumed by political infighting, took little action against al Shabab.
That allowed the insurgents to build up substantial reserves of cash and carry out attacks over a wide swathe of Somalia. Last week scores of al Shabab fighters and Ethiopian security forces were killed in clashes along the two nations' shared border.
Meanwhile, U.S. Africa Command remains committed to hunting down and killing al-Shebab elements whenever the opportunity arises.