Importance Surgical site infection has been shown to decrease survival in veterans by up to 42%. The association of 30-day postoperative infections with long-term infections in the overall surgical population remains unknown. Objective To determine whether exposure to 30-day postoperative infection is associated with increased incidence of infection and mortality during postoperative days 31 to 365. Design, Setting, and Participants In this retrospective observational cohort study, veterans undergoing major surgery through the Veterans Health Administration from January 2008 to December 2015 were included. Stabilized inverse probability of treatment weighting was used to balance baseline characteristics of the control and exposure groups. Cox proportional hazards regression was used to estimate hazard ratios of long-term infection and mortality. Data were analyzed from September 2018 to May 2019. Exposures Any 30-day postoperative infection (exposure group) vs no 30-day infection (control group). Main Outcomes and Measures Number of days between index surgery and the occurrence of death or the patient's first infection during postoperative days 31 to 365. Patients who died before having a long-term infection were censored for the infection outcome. Results Of the 659 486 included patients, 604 534 (91.7%) were male, and the mean (SD) age was 59.7 (13.6) years. Among these patients, 23 815 (3.6%) had a 30-day infection, 43 796 (6.6%) had a long-term infection, and 24 810 (3.8%) died during follow-up. The most frequent 30-day infections were surgical site infection (9574 [40.2%]), urinary tract infection (6545 [27.5%]), pneumonia (3515 [14.8%]), and bloodstream infection (1906 [8.0%]). Long-term infection types included urinary tract infection (21 420 [48.7%]), skin and soft tissue infection (14 348 [32.6%]), bloodstream infection (3862 [8.8%]), and pneumonia (2543 [5.8%]). Patients in the exposure group had a higher observed incidence of long-term infection (5187 of 23 815 [21.8%]) and mortality (3067 of 23 815 [12.9%]) compared with those without 30-day infection (38 789 of 635 671 [6.1%] and 21 743 of 635 671 [3.4%], respectively). The estimated hazard ratio for long-term infection was 3.17 (95% CI, 3.05-3.28) and for mortality was 1.89 (95% CI, 1.79-1.99). Conclusions and Relevance At any given point during the follow-up period, patients with 30-day postoperative infection had a 3.2-fold higher risk of 1-year infection and a 1.9-fold higher risk of mortality compared with those who had no 30-day infection. Cost-benefit calculations for surgical infection prevention programs should include the increased risk and costs of long-term infection and death. Preventive efforts in the first 30 days postoperatively may improve long-term patient outcomes. Question Is infection during postoperative days 0 to 30 associated with increased incidence of infection and mortality during postoperative days 31 to 365? Findings In this cohort study of 659 486 veterans, infection within 30 days after surgery was significantly associated with infection and mortality during postoperative days 31 to 365. Meaning Infection after surgery is associated with long-term harm, which should be accounted for in the costs and benefits of infection prevention programs. This cohort study investigates whether exposure to 30-day postoperative infection is associated with increased incidence of infection and mortality during postoperative days 31 to 365.