Previous research suggests that cognitive inflexibility prospectively increases vulnerability to suicidal ideation, but the specific cognitive factors that may explain the relation have not been examined empirically. The present study examined the brooding subtype of ruminationand hopelessness as potential mediators of the prospective relation between cognitive inflexibility and suicidal ideation. Fifty-six young adults who completed a measure of cognitive inflexibility and suicidal ideation at baseline were followed up 2–3 years later and completed measures of brooding, hopelessness, and suicidal ideation. Cognitive inflexibility at baseline predicted suicidal ideation at follow up, adjusting for baseline ideation. This relation was mediated by brooding but not by hopelessness. However, there was an indirect relation between perseverative errors and suicidal ideation through brooding, followed by hopelessness, such that brooding was associated with greater hopelessness and hopelessness, in turn, was associated with greater suicidal ideation. Cognitive inflexibility may increase vulnerability to suicidal thinking because it is associated with greater brooding rumination, while brooding, in turn, is associated with hopelessness.