Sanctuary was a planet located in either the Alpha or Beta Quadrants near the Klingon Empire. The planet was maintained as a sanctuary for those who were criminals or facing political persecution by the Senites, a race that was native to the Sanctuary homeworld. The planet was considered a legend inside the Federation on the same level as Atlantis or El Dorado.
The Senites maintained multiple settlements on the planet, including Dohama and the town on the island of Khyming. In these towns the settlements provided all necessary creature comforts to those living in the towns. This included providing food, clothing, and housing on demand as well as prostitutes in areas with very few females. The non-Senite inhabitants of the planet were generally very satisfied with this arrangement, though there were a few dissatisfied residents.
There also existed a border area where Senites did not choose to exercise control. In this area lived a group called the Lost Ones, children abandoned by their parents who were never socialized. Beyond the area inhabited by the Lost Ones existed the Graveyard of Lost Ships. The graveyard contained the wreckage and leftovers of any ships captured by the Senites and was inhabited by a group of people who liked to tinker with the remaining ships to see if they could escape the planet.
Because so many criminals lived on the planet, a fleet of bounty hunters maintained station over the planet in an effort to catch incoming criminals. Further, because of a defense shield around the planet, no one was able to escape the planet after they reached it, so criminals avoided justice completely once they reached the surface of the planet.
In 2268, Captain James T. Kirk, Spock, and Doctor Leonard McCoy of the USS Enterprise were trapped on the planet after they pursued the pirate Auk-rex to Sanctuary. With the help of the inhabitants of the Graveyard of Lost Ships, the three were able to return to the Enterprise, and the Senites were forced to reconsider their method of running the planet overall. (TOS novel: Sanctuary)