Exposure and ritual prevention (EX/RP) is an effective first-line treatment for obsessive-compulsive disorder (OCD), but only some patients achieve minimal symptoms following EX/RP. Herein, we investigate whether task-based neural activity can predict who responds best to EX/RP. Unmedicated adult patients with OCD (n = 36) and healthy participants (n = 33) completed the Simon Spatial Incompatibility Task during high-resolution, multiband functional MRI (fMRI); patients were then offered twice-weekly EX/RP (17 sessions). Linear mixed-effects models were used to identify brain regions where conflict-related activity moderated the slope of change in Yale–Brown Obsessive-Compulsive Scale (Y-BOCS) scores across treatment. Conflict-related activity in the left pallidum and 35 cortical parcels/regions significantly predicted symptom improvement with EX/RP for patients with OCD (false discovery rate-corrected P < 0.05). Significant parcels/regions included cingulo-opercular and default mode network regions, specifically the anterior insula and anterior and posterior cingulate. Summarizing across these parcels/regions, greater conflict-related activity predicted greater EX/RP response and which patients achieved remission (Y-BOCS score ≤ 12; Cohen’s d = 1.68) with >80% sensitivity and specificity. The association between brain activity and treatment response was partially mediated by patient EX/RP adherence (b = −2.99; 43.61% of total effect; P = 0.02). Brain activity and adherence together were highly predictive of remission. Together, these findings suggest that cingulo-opercular and default mode regions typically implicated in task control and introspective processes, respectively, may be targets for novel treatments that augment the ability of persons with OCD to resolve cognitive conflict and thereby facilitate adherence to EX/RP, increasing the likelihood of remission.