A detainment moon served as a place of imprisonment for those who opposed the Imperial regime, as well as other lawbreakers; it was a type of moon.
These moons for holding prisoners came into existence as a result of the suppression of Rebel operations leading up to the Battle of Yavin in 1 BBY. The transfer of prisoners to these locations was accomplished using enormous Imperial prison barges, which were essentially mobile prisons equipped with all necessary personnel like guards and wardens that moved across the galaxy. An example of a detainment moon was Gradient Seven.