Despite the growing evidence on the associations between greenspace and violent crime, there is a lack of research on the urban greenspace’s influence on the associations between ambient temperature and violent crime. This observational study examined the risk differences by community’s greenspace level using various greenspace indicators. Our time-series analysis modeled the associations between daily mean temperature (°C) over two lag days (lag0–1) and daily counts of violent crime during summer (May–September) in each ZIP code in Chicago, IL (2001–2023), adjusting for confounding factors. Our random-effects meta analysis analyzed estimated the pooled relative risk (RR) at the 80th summer temperature percentile compared to the reference temperature (10th percentile) across the ZIP codes. Our meta-regressions analyzed how the ZIP code-specific relative risks (RRs) differ by the number of parks, sum of park areas, percentage of vegetated area, percentage of recreational vegetated area, vegetation density (30 m), percent tree coverage, and percent street-level tree coverage aggregated at the ZIP code level. A total of 1075 959 counts of violent crime were included in our analysis. We found 8% (95% CI: 7%–10%) higher risk of violent crime incidents when the daily mean temperature was at the 80th percentile (25.9 °C) compared to the reference temperature (8.6 °C). The pooled RR was significantly lower in ZIP codes with the highest vegetation density (RR = 1.085 [95% CI: 1.040–1.131]) compared to those with the lowest vegetated density (RR = 1.124 [1.088–1.162]). The RR was significantly lower in ZIP codes with the highest percentage of tree coverage (RR = 1.088 [1.046–1.132]) compared to the ZIP codes with the lowest percentage of tree coverage (RR = 1.123 [1.086–1.162]). The observed results indicate that greenspace can be beneficial in reducing the associations between heat and violent crime. The results should be considered in urban greenery planning and policies to reduce violent crime.