Lifestyle factors related to energy balance have been associated with ovarian cancer risk and influence the tumor immune microenvironment, including tumor-associated macrophages (TAM). However, no studies have assessed whether these factors differentially impact ovarian cancer risk by TAM densities. We conducted a prospective analysis in the Nurses' Health Studies to examine the associations of physical activity, sitting time, and a food-based empirical dietary inflammatory pattern (EDIP) score with invasive epithelial ovarian cancer risk by TAM density assessed by immunohistochemistry. We considered density of CD68 (marker of total TAMs) and CD163 (marker of pro-carcinogenic M2-type TAMs), and their ratios. We used multivariable Cox proportional hazards regression to calculate hazard ratios (HR) and 95% confidence intervals (CI) of exposures with risk of ovarian tumors with high versus low TAMs, including analyses stratified by body mass index. Analyses included 312 incident ovarian cancer cases with TAM measurements. Physical activity, sitting time, and EDIP score were not differentially associated with ovarian cancer risk by TAM densities (P heterogeneity > 0.05). Among overweight and obese women, higher EDIP score was associated with increased risk of CD163 low-density tumors (HR comparing extreme tertiles, 1.57; 95% CI, 0.88-2.80; P trend = 0.01), but not CD163 high-density tumors (comparable HR, 1.16; 95% CI, 0.73-1.86; P trend = 0.24), though this difference was not statistically significant (P heterogeneity = 0.22). We did not observe differential associations between lifestyle factors and ovarian cancer risk by TAM densities. Future investigations examining the interplay between other ovarian cancer risk factors and the tumor immune microenvironment may help provide insight into ovarian cancer etiology.