After being hospitalized, John Nash receives insulin shock therapy for his schizophrenia. He's also put on a course of first-generation anti-psychotic medication. Before long, though, Nash has stopped taking his meds, as he cannot handle the side effects.
The first generation of anti-psychotic medications had a number of side effects, including stiffening of the muscles, over-sedation, and sexual problems. But there was another potential side effect that is particularly relevant to Nash: the blunting of the intellect. This is an especially worrying symptom to a great mathematician like Nash.
This is someone who needs to stay mentally sharp if he's to carry out his work at even the most basic level. But if the meds he's taking blunt his intellect, then it's hard to see how Nash would be able to do that, let alone stay at the top of his game. So he makes the decision to discontinue taking medication for his schizophrenia.
This is a risky decision, to be sure, one fraught with all kinds of potentially deadly consequences. Nash is certainly going against the prevailing medical consensus by stopping his meds. But at the same time, one can understand why someone in his position, who's defined as much as anything by the extraordinary power of his intellect, would be willing to take a risk in order to continue with his ground-breaking work in mathematics.