Dwain Osborne, 26, from Penge, south east London, who worked in the library at Brixton jail, also allegedly had a media drive containing a list of all inmates and their cells, and a list of staff and their personal information.
He is accused of trying to buy the gun and ammunition on the so-called “Dark Web” – unlisted and hard-to-trace websites – and when officers from the National Crime Agency searched his home in October last year it is claimed they also found the media drive, a police uniform and two stolen passports.
During a second search earlier this month, it is alleged they found cocaine with wraps, scales and cutting agent, as well as cash.
Osborne is facing nine counts including attempting to possess a firearm and attempting to possess ammunition with intent to endanger life; and attempting to buy a gun and attempting to buy ammunition without authority.
The remaining five charges are possession of cocaine with intent to supply; possession of a class B drug; theft of a police uniform; possession of identity documents belonging to another; and gaining unauthorised access with intent to commit or facilitate the commission of a further offence under the Computer Misuse Act.
Osborne is due to appear at the Old Bailey on March 17.