Ahmed Ouyahia was sentenced to 15 years and Abdelmalek Sellal to 12, the state-run APS news agency reported.
It was the first time since Algeria's independence from France in 1962 that former prime ministers had been put on trial.
The state prosecutor had sought 20-year prison sentences for the two ex-premiers.
In all, 19 defendants were tried on charges ranging from money laundering to abuse of office and granting undue privileges in the vehicle assembly industry.
The nascent Algerian automotive sector got its start in 2014, via partnerships between foreign groups and large Algerian corporations, often owned by businessmen linked to Bouteflika's entourage.
One former industry minister, Abdeslam Bouchouareb, who is on the run abroad, was sentenced in absentia to 20 years.
Two other former industry ministers, Mahdjoub Bedda and Youcef Yousfi, were handed 10-year terms.
Businessman Ali Haddad, founder and CEO of private construction firm ETRHB and former head of Algeria's main employers' organisation, was sentenced to seven years.
Three businessmen who own vehicle assembly plants -- Ahmed Mazouz, Hassen Arbaoui and Mohamed Bairi -- were sentenced to seven years, six years and three years respectively.
The verdicts come just two days before Algeria is due to elect a president to replace Bouteflika in a vote bitterly opposed by the country's nine-month-old protest movement, which sees it as a regime ploy to cling to power.
While no opinion polls have been published, observers expect high levels of abstention, in keeping with previous elections in a political system seen by voters as rigid and unaccountable.
More about: Algeria