Giving evidence, a detective constable said the accused later agreed to be searched, and had removed the two packages from his boots, indicated they were drugs, and said he was acting under duress.
It follows an investigation by the PSNI's criminal investigation branch into the trafficking of prohibited items into Maghaberry prison.
Applying for bail at Lisburn Magistrates' Court, Martin's defence lawyer claimed he had been forced into bringing the items into the prison by an inmate who had been threatening him that he knew where he and his girlfriend lived.
A mobile phone was also recovered from the property which, the officer claimed, contained "insurmountable" evidence of Martin's involvement in drug dealing inside and outside Maghaberry.
"We will continue to work closely with the Prison Service to clamp down on the trafficking of illicit drugs into prisons".
A 23 year-old prison officer was arrested this morning on suspicion of involvement in the supply of Class A and B drugs, as well as prescription medication into the prison.
Judge Watters said Martin should have known to alert prison authorities if he was subject to any threats from prisoners.
Mr Martin is due to appear before the same court, via video-link, on 18 September.
A 55-year-old woman and a 26-year-old woman who were arrested as part of the same investigation have been released on bail pending further enquiries.
Drugs were also recovered during searches in Lisburn and Dungannon.