The prevalence of anemia in patients with community-acquired pneumonia (CAP) has been well described. However, few studies have explored its association with short-term and long-term mortality risk in CAP patients. We aimed to investigate the associations between hemoglobin concentrations at baseline and 14-day and 1-year mortality risk in a CAP population with a large sample size. Our data originated from the Dryad database, including a dataset from the study "Incidence rate of community-acquired pneumonia in adults: a population-based prospective active surveillance study in 3 cities in South America." A total of 1463 study samples with follow-up data from the dataset were enrolled for our analysis. During the follow-up period of 3 years, the 14-day risk and 1-year mortality risk were 206 (14.08%) and 401 (27.41%), respectively, among these CAP patients. Curve analysis indicated a strong U-shaped relationship between blood hemoglobin concentrations and 14-day mortality (r = -0.191, P < .001) and 1-year mortality (r = -0.220, P < .001). The blood hemoglobin level with the lowest point of mortality risk was 14.5g/dL, suggesting that an increased hemoglobin concentration contributed to reduced 14-day and 1-year mortality risk in CAP patients when hemoglobin does not exceed 14.5g/dL even if it is within the normal clinical range. In addition, we also observed significant associations of hemoglobin with 14-day mortality risk (odds ratio [OR] = 0.817; 95% CI, 0.742-0.899 P < .001) and 1-year mortality risk (OR = 0.834; 95% CI, 0.773-0.900; P < .001), but only in participants without risk factors for health care-associated pneumonia (HCAP) rather than in participants with risk factors for HCAP. The greatest discovery is that our findings indicated a significant U-shaped relationship between hemoglobin levels and 14-day and 1-year mortality risk in CAP patients. However, a significant relationship was only discovered in subjects without risk factors for HCAP. More evidence is needed to support this finding.