A judge told pharmacy assistant Mark Beggs, 30, and 26-year-old courier Paul Murphy that they abused their “unique position of trust” by raiding supplies of Pregabalin, also known by the brand name Lyrica.
The pair were arrested in October following an investigation into supplies going missing from the hospital’s stores.
Beggs, of Parkmount Gardens in Belfast, and Murphy, from Foxes Glen in the Dunmurry area of the city, were observed on CCTV footage putting tablets in their coats.
Belfast Magistrates’ Court heard a total of 980 pills of mixed strength, valued at around £611, were stolen.
Linfield v Portadown Sunday clash: Breakers of the Sabbath will answer to God
Thousands expected to take part in 'Derry Day' this weekend
Esmond Birnie: The protocol is not as claimed boosting growth in Northern Ireland
Crawfordsburn Country Park: Five PSNI officers injured bringing crowd of 600 under control - two teens arrested - parents asked to know where their children are
NI Weather: 45 pictures of how we enjoyed wall-to-wall sunshine
Both men pleaded guilty to charges of theft by an employee and possessing a medicinal product with intent to supply.
Having lost their jobs, they sat with heads bowed in the dock as details of their thieving were disclosed.
District Judge Fiona Bagnall was told another, unidentified, person had asked them to steal the supplies.
Counsel for Beggs, Chris Hogg, said his client acted in a bid to pay off a £300 overdraft.
“Both men were approached by an individual who said ‘If you get these drugs for me I will be able to buy them from you’.
“They were the people who had the keys to get the drugs.”
Mr Hogg argued that the defendants were at the lower end of a supply chain.
Murphy’s barrister told the court his client knew nothing about Pregabalin.
“He was just stealing something from hospital to be passed on, he wasn’t aware of its significance or where it would go to,” the lawyer said.
“He knows of Lyrica; but Pregabalin, he was ignorant what that substance was.”
Judge Bagnall ruled that the offences warranted immediate imprisonment.
Sentencing both defendants to six months in jail, she said: “These are people in unique positions of trust.
“Having access to hospital drugs products and to have a situation whereby they abuse that trust has to place them in immediate custody territory.”
Defence lawyers immediately indicated their intention to seek bail pending an appeal against the terms imposed.