The anterior cingulate cortex (ACC) has been implicated in both sustained attention (SA) and pain perception. Nonetheless, only a small body of literature has examined the relationship between SA and pain perception. This study utilized fMRI to examine activation patterns that emerged in the ACC in healthy participants and participants with chronic pain (due to osteoarthritis (OA) of the knee) while completing a sustained attention task with and without exposure to an acute painful stimulus. Independent component analysis (ICA) was used to determine groups of voxels within the ACC that covaried with performance on the SA task completed with and without exposure to a painful stimulus. In all participants, two distinct spatial patterns within the ACC were isolated that reflected (1) disrupted ACC activity when a painful stimulus was applied, or (2) emergent ACC activity when a painful stimulus was applied. In the healthy group, there were broadly distributed clusters of voxels within the ACC that were modulated by painful stimulation. But in the chronic pain group, a discrete focal region of the ACC was modulated by pain. These results demonstrate that ACC activity is modulated differently during tasks of SA and pain, and that acute pain in healthy participants and participants with chronic pain result in significantly different ACC activation patterns.