Paul French was arrested after he was spotted selling cocaine on the streets of Middlesbrough last July.
The 44-year-old had been out on licence for more than a year before being recalled to serve the remainder of his sentence following his arrest.
Teesside Crown Court heard how French was caught dealing the Class A drug on Westward Close, Middlesbrough.
Caroline McGurk, prosecuting, said £120 was seized from the defendant along with the cocaine and drug paraphernalia.
Paul French (Image: Cleveland Police)
French, of Addison Road, Middlesbrough, pleaded guilty to possession with intent to supply Class A drugs on July 21 last year.
Tom Bennett, mitigating, said his client was using drugs himself at the time of the offending.
See more court stories from The Northern Echo by clicking here
Don’t miss out on our biggest sale of the year! Get a full year of the Northern Echo for only £25 or try 6 months for just £6. Click here for details.
He said: “He relapsed pretty soon after coming out on licence onto drink and drugs following the breakdown of a long-term relationship.
“He turned back, regrettably, to his old habits of taking drugs all of the time. He accepts that he was supplying but the only reason for doing that was to fund his own habit.”
Judge Jo Kidd sentenced French to three years and two months for his role in the illicit drug supply network.
She added: “That offence took place while you were on licence from a 54-month sentence for robbery and the fact it was committed at that time is an aggravating feature.”