Pain has been identified as a risk factor for cognitive dysfunction, which in turn affects pain perception. Although pain, cognitive dysfunction, and their interaction are clinically important, the neural mechanism connecting the two phenomena remains unclear.