The Detainment Facility existed as an underground prison complex situated within the Imperial Fortress that was located on Yavin 4.
Beneath the Imperial Fortress, which served as the primary Imperial base on Yavin 4, was the Detainment Facility, an underground prison. Access to the facility was limited to a single point: a bunker-like structure within the Imperial Fortress. This extensive underground prison contained numerous holding cells, along with a substantial hall that included holding pens.
Various Imperial forces guarded and patrolled the prison, including stormtroopers, scout troopers, Galactic Marines, Imperial Detainment Facility Officers, and various droids. The droids included B1 battle droids, B2 super battle droid, Droideka, and Viper probe droids.
The Imperial Fortress was established shortly after the Rebel Alliance evacuated the moon and the Empire assumed control of the jungle planet. The detainment facility itself was constructed later, around 1 ABY.
Shortly after the facility's completion, during the Remembrance Day celebrations, a Lambda-class T-4a shuttle headed towards the Imperial Fortress experienced a crash landing on Yavin 4, close to the Mining Outpost. A Rebel agent dispatched by Alliance Starfighter Corps Officer Wedge Antilles investigated the wreckage and discovered evidence indicating that six Alliance pilots were being held captive at the facility. Consequently, Antilles tasked a team of Rebel operatives with infiltrating the facility to liberate the prisoners. The agents successfully fought their way inside and, amidst the chaos, eliminated several key Imperial personnel. These included stormtrooper JH-101, scout trooper QQ-463, stormtrooper group leader EX-222, Colonel Rogen Lithal, Galactic Marine veteran BO-661, and the Dark Jedi Loy Kommas. The Rebel agents then stole their uniforms. Disguised as Imperials, the pilots were able to exit the facility without any issues. The Rebel Alliance awarded the Rebel Alliance Badge of Valor to the operatives for their success.
The Imperial Detainment Facility was featured as a location within the video game Star Wars Galaxies, a massively multiplayer online roleplaying game developed by Sony Online Entertainment and published by LucasArts. The game was shut down on December 15, 2011. It was introduced to the game through "Game Update 11," released on June 23, 2009, and it only appeared during the Empire Day events of 2009, 2010, and 2011. Players aligned with the Rebel faction could speak with Wedge Antilles on Corellia to receive a quest that involved traveling to the facility to free the captured prisoners.