The city of Chongqing in the south-east of the country has a population of 49 million packed into 31,000 square miles, causing urban planners to look creatively at solving space issues.
A special railway station was built into the block of houses, set into the sixth to eighth floors.
Residents can hop on Chongqing Rail Transit No.2 at their own Liziba station.
Even though they are living in close quarters to a busy train station, any noise has been muffled by special equipment.
To homeowners in the complex, the sound of the train is designed to be as disturbing as the noise from a dishwasher.
By doing this, planners avoided having to take the whole building down to make way for the train tracks.
A city transport spokesman said: 'Our city is very heavily built upon and that can make finding room for roads and railway lines a real challenge.'
The port city of Chongqing is one of the four municipalities in China and lies along the banks of the river Yangtze.
Even though it is a densely populated area, it is nicknamed the Mountain City because it lies around deep swathes of forest and hills.