Jaspar Ojela, 56, pleaded guilty to three counts of supplying drugs in the Dudley borough between February and September 2016.
The prescribed drugs ranged from pain relief, such as Tramadol, to Zolpidem, a sleeping aid.
At the time, Mr Ojela was a qualified pharmacist supplying to other qualified pharmacists.
Ojela, of Bustleholme Lane, West Bromwich, supplied thousands of packets, including 3,477 packets of Zolpidem, 1,420 packets of Zopiclone, for insomnia, 400 packets of Dihydrolodeine, for pain relief, and 350 packets of Tramadol.
Ojela was the owner of Kates Hill Pharmacy, in St John's Road, Dudley, until it closed in June 2017, said Johnathan Barker, prosecuting.
The defendant was made bankrupt in July last year due to the business not being viable, he added.
A Home Office drugs licence permits a holder to posses controlled drugs, but at no time did Ojela or the pharmacy hold one, Mr Barker said.
The drugs were being sold on the black market, and Ojela's motivation was "purely financial", according to the prosecution.
Ojela named two pharmacists and said he had been dealing with them for six months in 2016.
"Mr Ojela concluded his sales towards the end of 2016 as he knew what he was doing was wrong," Mr Barker said.
"The two pharmacists were investigated but there was no evidence to corroborate the allegations."
Mr Barker said Ojela had described making about £1,870 profit, but that the street value of the drugs he sold would have been £280,000.
Defending, James Bruce, said: "There's nothing to say he received the £200,000, his sorts of figures are in the thousands, maybe not even 2,000.
"He is a very educated man but not a very good businessman.
"He was at a low ebb, the pharmacies approached him and in that low ebb he agreed to provide them with that that he shouldn't have.
"This is one of those rarer cases where the court would be entitled to go outside the guidelines."
Judge Dean Kershaw said: "This defendant knew the drugs were going to be inside somebody's body at some point.
"I have to sentence you for what I consider to be very serious offending.
"The dangerous effect of these drugs going on the black market is obvious.
"What you did was a very serious breach of your duty as a pharmacist."
Judge Kershaw sentenced Ojela to 28 months in prison, of which he will serve half.