Previous studies have found that acute febrile infection may decrease the risk of breast cancer. Meanwhile, it is well known that interleukin-6 (IL6) played dual roles in the tumor microenvironment. Fever may stimulate IL6 production, and IL6 rs1800796 also influences the expression of IL6. However, the impact of fever and its interaction with IL6 rs1800796 on breast cancer survival remains to be explored. This was a prospective cohort study of 4,223 breast cancer patients. Exposures were pre-/postdiagnostic infection-induced fever and rs1800796 polymorphism. The endpoints were overall survival (OS) and progression-free survival (PFS). Adjusted hazard ratios were obtained using multivariate Cox proportional hazards regression models. Compared with women without prediagnostic fever, the adjusted hazard ratio (HR) of progression for those with prediagnostic fever was 0.81 (95% CI, 0.66-0.99), particularly for the CC genotype of IL6 rs1800796 (HR, 0.53; 95% CI, 0.36-0.79). OS was also better (HR, 0.59; 95% CI, 0.36-0.99) among women with the CC genotype exposed to prediagnostic fever, accompanied by a significant interaction (P = 0.021). Postdiagnostic fever conferred better PFS for breast cancer (HR, 0.72; 95% CI, 0.52-1.00). Irrespective of the genotype of IL6, lymph node-positive women with postdiagnostic fever (HR, 0.57; 95% CI, 0.37-0.89) had a lower risk of progression than lymph node-negative women (HR, 1.12; 95% CI, 0.70-1.79). Infection-induced fever was beneficial to breast cancer survival, particularly for women who were the CC genotype of IL6 rs1800796 or node positive. This study provides new insight into the roles of infection-induced fever as a potential prognostic marker and therapy regimen for breast cancer.