Murderer Stephen Nisbet, 40, used a secret stash of mobile phones inside HMP Edinburgh to arrange drug deals across Scotland.
His businessman brother James Nisbet, 46, set a up a supposed recycling firm as a front to help flood the country with heroin.
But the two men – along with a team of couriers – were caught when detectives swooped in January last year.
It lead to the brothers being convicted of supplying heroin following a lengthy trial at the High Court in Glasgow.
Passing sentences totalling 48 years and 10 months today, judge Lord Armstrong said the men had been involved in an operation which was “organised and planned”.
He added: “The courts must take full and proper account of the widespread harm that is caused by the supply and abuse of controlled drugs.”
Stephen Nisbet is already serving an 18-year sentence after being convicted of murder in 2003.
Lord Armstrong described him as the “principal figure” and jailed him for 12 years, to begin after his current minimum prison sentence ends.
His brother was jailed for 10 years.
Co-accused Ronald Harrison and Allan Holland, 38, were also found guilty of being concerned in the supply of heroin although had lesser roles.
John McMahon, 27, David Milne, 34, and Robert Borland, 35, all earlier admitted to related drug charges.
Each of the jail sentences the men received was between four and eight years for their involvement.
A jury heard how Stephen Nisbet orchestrated a lucrative crime network despite being locked up in HMP Edinburgh.
Away from the gaze of prison guards, he had access to mobile phones with up to 10 different numbers.
This enabled him to set-up what prosecutors called “a family drug dealing business” between June 2013 and January last year.
His elder brother James formed a firm called Platinum Waste Solutions – close to the family cottage in Shotts, North Lanarkshire.
But the trial heard this was a “front” to distribute heroin throughout the country.
Police found out about the operation and watched as drug deals were carried out across Scotland – including in Dundee, Fife and Lanarkshire.
The total value of value of heroin seized during the investigation was around £1.1m.
Detective Chief Inspector Colin Boyle, of Police Scotland’s organised crime and counter terrorism unit, said: “Nisbet, along with others, ran a drug empire throughout Scotland. Operation Lapstone did not just disrupt this empire - it dismantled it.
“As an organisation we are committed tackling the sale and supply of drugs in our community and this continues to be a top priority for Police Scotland.
“We will not tolerate this type of anti-social behaviour and we will continue to hold those who peddle drugs in our community to account and bring them to justice.”