Access to high-quality education is essential for achieving social and economic development, yet academic performance remains a challenge in many low- and middle-income countries, such as Brazil. The neighborhood environment is increasingly recognized as an important factor that can influence academic performance. The existing literature on this topic is limited. Most studies have focused either on the exposure surrounding a student's school or their home. To address this gap, this study aimed to evaluate the association between neighborhood characteristics around both the student's school and home in the Federal District (FD), Brazil, focusing on green spaces (NDVI and quantity of green spaces), roads (length of roads), and wildfires as potential predictors of academic performance. We analyzed 344,175 students who were enrolled in the public schools (256 schools) of the FD from 2017 to 2020. We employed a mixed-effects regression model to investigate the relationship between individual-level academic performance and the neighborhood characteristics, while controlling for temporal, socioeconomic, and school-specific variables. Our results suggest that neighborhood characteristics represented by green spaces, roads, and wildfires, can have a significant impact on academic performance. We found that some neighborhood characteristics had a stronger association with academic performance when they were located around schools, compared to when they were located around students' homes. For example, the coefficient for NDVI within the buffer of 250m and 500m surrounding schools was estimated to be 2.48 (95%CI: 2.33; 2.63) and 0.59 (95%CI: 0.47; 0.71), respectively, while for NDVI surrounding homes, it was 0.23 (95%CI: 0.15; 0.30) and 0.25 (95%CI: 0.17; 0.33) for the buffer of 250m and 500m, respectively. Our study provides valuable insights into the potential role of neighborhood characteristics in promoting academic performance, which could inform urban planning and public policy aimed at improving educational outcomes.