Dominic Azzopardi, 34, of Mosta, and Jason Mifsud, 29, of Sliema, were yesterday charged with being in possession of heroin in prison in January last year.
The two were also charged with taking illegal substances into prison.
Mifsud was charged with relapsing.
Inspector Abraham Zammit prosecuted.
Dr Roberto Montalto and Dr Josè Herrera appeared for the accused.