Adam Ptach was found in possession of large quantities of synthetic cannabis after he was arrested for peddling the drug in the city centre.
Ptach, 33, also claimed he he had been giving the class B drug away for FREE after he had been spotted on CCTV acting suspiciously.
Leeds Crown Court heard police were alerted when Ptach appeared to be dealing the drug to four men on Boar Lane, on April 5 this year.
Footage also showed him in possession of a set of scales.
Officers stopped Ptach on Briggate and he told them: “I give it out for free.”
Ptach’s rucksack was searched and two tins were recovered which contained spice with a total street value of around £5,000.
Bashir Ahmed, prosecuted, said the set of scales was also recovered from the bag.
Ptach claimed the drug was for his own use when he was interviewed but refused to comment further.
Polish national Ptach, of no fixed address, pleaded guilty to possession of a class B drug with intent to supply.
Colin Byrne, mitigating, said Ptach was homeless and was a regular beggar on the streets in Manchester and Leeds.
Judge James Spencer, QC, asked Mr Byrne how his client had managed to obtain such a large amount of the drug.
Mr Byrne said: “He wasn’t spending money and was living in a tent.”
The lawyer added: “He came from Manchester to Leeds and was begging to such an extent that he was able to buy the drugs.
“He says that he knows what it is like to be addicted and he was prepared to give the drugs away.”
Ptach was jailed for eight months.
Judge Spencer said: “This substance that you were peddling on the streets of Leeds as a very dangerous one.
“It seems to me that street dealing in that kind of class B material justifies a prison sentence.”