Several associations between the built environment and COVID-19 case distribution have been identified in previous studies. However, few studies have explored the non-linear associations between the built environment and COVID-19 at the community level. This study employed the March 2022 Shanghai COVID-19 pandemic as a case study to examine the association between built-environment characteristics and the incidence of COVID-19. A non-linear modeling approach, namely the boosted regression tree model, was used to investigate this relationship. A multi-scale study was conducted at the community level based on buffers of 5-minute, 10-minute, and 15-minute walking distances. The main findings are as follows: (1) Relationships between built environment variables and COVID-19 case distribution vary across scales of analysis at the neighborhood level. (2) Significant non-linear associations exist between built-environment characteristics and COVID-19 case distribution at different scales. Population, housing price, normalized difference vegetation index, Shannon's diversity index, number of bus stops, floor-area ratio, and distance from the city center played important roles at different scales. These non-linear results provide a more refined reference for pandemic responses at different scales from an urban planning perspective and offer useful recommendations for a sustainable COVID-19 post-pandemic response., Competing Interests: The authors have declared that no competing interests exist., (Copyright: © 2024 Gao et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.)