PURPOSE Physical activity (PA) is a promising intervention for cancer-related cognitive decline, yet research assessing its use during chemotherapy is limited. This study evaluated patterns of PA before, during, and after chemotherapy in patients with breast cancer and the association between PA and cognitive function. METHODS In a nationwide, prospective cohort study, we assessed PA (Aerobics Center Longitudinal Study PA measure) and perceived and objectively measured cognitive functioning (Functional Assessment of Cancer Therapy–Cognitive, Delayed Match to Sample, and Rapid Visual Processing measures) at prechemotherapy (T1), postchemotherapy (T2), and 6 months postchemotherapy (T3) in patients with breast cancer and cancer-free, age-matched controls at equivalent time points. Longitudinal linear mixed-effects models (LMMs) characterized PA changes over time between patients and controls, adjusting for demographic and clinical factors. LMMs further estimated the role of prechemotherapy PA and changes in PA during chemotherapy on cognitive changes over time. RESULTS Patients with stage I-IIIC breast cancer (n 5 580; age M [standard deviation] 5 53.4 [10.6] years) and controls (n 5 363; age M [standard deviation] 5 52.6 [10.3] years) were included. One third of patients met national PA guidelines at T1, dropping to 21% at T2 before rising to 37% at T3. LMMs revealed declines in PA from T1 to T2 in patients compared with controls (all P, .001). Patients meeting guidelines at T1 demonstrated better cognitive scores over time on the Functional Assessment of Cancer Therapy–Cognitive and Rapid Visual Processing (all P, .05), with similar patterns of objectively-measured cognitive function as controls. In patients, greater moderate-to-vigorous PA at the previous time point was significantly associated with better cognitive trajectories (all P, .05), and adherence to PA guidelines throughout chemotherapy was associated with better self-reported cognition (P, .01). CONCLUSION This nationwide study demonstrates that PA maintenance before and during chemotherapy is associated with better cognitive function immediately and 6 months after chemotherapy completion.