It inhibits the synthesis of purines and pyrimidines, thus suppressing immune cell proliferation. Methotrexate works by blocking an enzyme involved in DNA synthesis, which is necessary for immune cells to multiply. In autoimmune diseases like rheumatoid arthritis, this helps by slowing down the overactive immune response that causes joint inflammation and pain.