Catalyzes the S-methylation of thiopurine drugs such as 6-mercaptopurine (also called mercaptopurine, 6-MP or its brand name Purinethol) and 6-thioguanine (also called tioguanine or 6-TG) using S-adenosyl-L-methionine as the methyl donor (PubMed:18484748, PubMed:657528). TPMT activity modulates the cytotoxic effects of thiopurine prodrugs. A natural substrate for this enzyme has yet to be identified.