The town was home for many Chinese sailors and traders who trade goods with the Japanese from the 15th to 19th centuries. The Chinese traders came to Nagasaki because it was the only "open port" to visit Japan at this time.
The Tokugawa government allowed only Nagasaki to stay open to the rest of the world, but closed off the rest of Japan to prevent Western influences and the spread of Christianity.
Strict rules were placed on these Chinese traders, forcing them to stay in this Chinatown, and preventing them from going outside the town at night. Any one found outside of the town at certain times were arrested by the local guard.