Growing evidence supports a major contribution of cortical serotonin (5-hydroxytryptamine, 5-HT) to the modulation of cognitive flexibility and the cognitive inflexibility evident in neuropsychiatric disorders. The precise role of 5-HT and the influence of 5-HT gene variation in mediating this process is not fully understood. Using a touch screen-based operant system, we assessed reversal of a pairwise visual discrimination as an assay for cognitive flexibility. Effects of constitutive genetic or pharmacological inactivation of the 5-HT transporter (5-HTT) on reversal were examined by testing 5-HTT null mice and chronic fluoxetine-treated C57BL/6J mice, respectively. Effects of constitutive genetic loss or acute pharmacological depletion of 5-HT were assessed by testing Pet-1 null mice and para-chlorophenylalanine (PCPA)-treated C57BL/6J mice, respectively. Fluoxetine-treated C57BL/6J mice made fewer errors than controls during the early phase of reversal when perseverative behavior is relatively high. 5-HTT null mice made fewer errors than controls in completing the reversal task. However, reversal in Pet-1 null and PCPA-treated C57BL/6J mice was not different from controls. These data further support an important role for 5-HT in modulating reversal learning and provide novel evidence that inactivating the 5-HTT improves this process. These findings could have important implications for understanding and treating cognitive inflexibility in neuropsychiatric disease.