Background: The density of particulate matter (PM) in mega-cities in China such as Beijing and Shanghai has exceeded basic standards for health in recent years. Human exposure to PMs has been identified as traceable and controllable factor among all complicated risk factors for lung cancer. While the improvement of air quality needs tremendous efforts and time, certain revision of PM's density might happen associated with the adjustment of built environment. It is also proved that urban built environment is directly relevant to respiratory disease. Studies have respectively explored the indoor and outdoor factors on respiratory diseases. More comprehensive spatial factors need to be analyzed to understand the cumulative effect of built environment upon respiratory system. This interdisciplinary study examines the impact of both indoor (including age of housing, interval after decoration, indoor humidity etc.) and outdoor spatial factors (including density, parking, green spaces etc.) on lung cancer. Methods: A survey of lung cancer patients and a control group has been conducted in 2014 and 2015. A total of 472 interviewees are randomly selected within a pool of local residents who have resided in Shanghai for more than 5 years. Data are collected including their socio-demographic factors, lifestyle factors, and external and internal residential area factors. Regression models are established based on collected data to analyze the associations between lung cancer and urban spatial factors. Results: Regression models illustrate that lung cancer presents significantly associated with a number of spatial factors. Significant outdoor spatial factors include external traffic volume (P=0.003), main plant type (P=0.035 for trees) of internal green space, internal water body (P=0.027) and land use of surrounding blocks (P=0.005 for residential areas of 7-9 floors, P=0.000 for residential areas of 4-6 floors, P=0.006 for business/ commercial areas over 10 floors, P=0.005 for business/commercial areas of 7-9 floors, P=0.043 for business/ commercial areas of 4-6 floors). Indoor spatial factors include age of housing (P=0.003) and indoor humidity (P=0.000). Conclusions: The findings support the hypothesis that both indoor and outdoor spatial factors are independently associated with lung cancer incidence. Certain principles based on the modeling results are proposed to revise the criteria for lung cancer screening of high-risk individuals. It also provides empirical evidence for urban planning and design to improve built environment with more thorough consideration of respiratory health.