Hozuki Castle was a prison established by Kusagakure at the request of the various nations to hold shinobi who had committed crimes. On the surface, it held prisoners, but in truth, it existed to study the ultimate weapon from the time of the Sage of Six Paths: the Box of Ultimate Bliss.
The prisoners it held fell roughly into three categories.
The first consisted of shinobi abandoned by their nations or lacking intelligence value. They served as experimental material for research into the Box of Ultimate Bliss and could vanish inexplicably at any time. Most prisoners fell into this category.
The second consisted of disguised spies from the various nations. Their main purpose was to gather intelligence and monitor the progress of research into the Box of Ultimate Bliss, so they could seize or destroy it once the research was complete. Kusagakure knew they were there, but its weaker position left it no choice but to tolerate them.
The third consisted of actual criminals, mainly those captured by Kusagakure.
The current person in charge of Hozuki Castle was the Kusagakure Jonin, Mui.
Mui specialized in Kusagakure Style Taijutsu and a Fire Style Sealing Jutsu called the Heavenly Prison Technique. The technique restricted the target's ability to mold Chakra. If the target left Hozuki Castle or got too far from Mui, the Heavenly Prison Technique would activate and burn them to death. It was an excellent means of keeping prisoners in check, which was why Mui's family had guarded Hozuki Castle for generations.
After Mui's son, Muku, died in an experiment with the Box of Ultimate Bliss, Mui came to his senses and became utterly disillusioned with Kusagakure. He continued researching the box solely to bring Muku back to life.
Unfortunately, though the Box of Ultimate Bliss appeared to be a