Marcus Aaron Yeldham, 43, of Great Darkgate Street, Aberystwyth, and Tobias Cribbett, 37, Alban Square, Aberaeron, appeared before Swansea Crown Court for sentencing on Friday.
Yeldham received a seven-and-a-half-year jail sentence, while Cribbett was given three years.
Their conviction and sentencing comes after a Dyfed-Powys Police investigation, which began when officers stopped Cribbett in January 2021.
He was found to be concealing drugs on his person with a value of around £1,380.
Two days later Yeldham was arrested after his car was stopped and mobile phones were seized.
The subsequent investigation showed Yeldham was organising the enterprise in Aberyswyth, with Cribbett couriering the drugs and assisting Yeldham in his activities bringing heroin and crack cocaine into Aberystwyth, having collected them from Bristol.
Officers were able to prove they ran drugs between December 2020 and February 2021.
The total amount of drugs supplied over the period has been estimated to include 95.5 grams of Diamorphine, or heroin, with a street value of around £12,000, and 57g of crack cocaine, with a street value of around £7,000.
Detective Constable Sam Garside said: “Tackling the people who bring and sell drugs into our area is a priority for the force, so we are pleased with this result.
“These men spent a number of months bringing highly addictive drugs into Aberystwyth to profit from spreading misery. This case shows we will come after anyone doing the same and we will prosecute them.
“If you believe someone is dealing drugs in your area, please let us know by email at firstname.lastname@example.org, on the force website or by calling 101.”