With people restricted to their residences, neighbourhood characteristics may affect behaviour and risk of coronavirus disease 2019 (COVID-19) infection. We aimed to analyse whether neighbourhoods with higher walkability, public transit, biking services and higher socio-economic status were associated with lower COVID-19 infection during the peak of the COVID-19 pandemic in Massachusetts. We used Walk Score®, Bike Score®, and Transit Score® indices to assess the walkability and transportation of 72 cities in Massachusetts, USA based on availability of data and collected the total COVID-19 case numbers of each city up to 10 April 2021. We used univariate and multivariate linear models to analyse the effects of these scores on COVID-19 cases per 100,000 in each city, adjusting for demographic covariates and all covariates, respectively. In the 72 cities studied, the average Walk Score, Transit Score and Bike Score was 48.7, 36.5 and 44.1, respectively, with a total of 426,182 COVID-19 cases. Higher Walk Score, Transit Score, and Bike Score rankings were negatively associated with COVID-19 cases per 100,000 persons (<0.05). Cities with a higher proportion of Hispanic population and a lower median household income were associated with more COVID-19 cases per 100,000 (P<0.05). Higher Walk Score, Transit Score and Bike Score were shown to be protective against COVID-19 transmission, while socio-demographic factors were associated with COVID-19 infection. Understanding the complex relationship of how the structure of the urban environment may constrain commuting patterns for residents and essential workers during COVID-19 would offer potential insights on future pandemic preparedness and response.