Mercaptopurine is an antimetabolite, specifically a purine antimetabolite. It interferes with the metabolism of purine bases, which are crucial for DNA and RNA synthesis. By mimicking the structure of natural purines, it gets incorporated into nucleic acids, leading to faulty DNA and RNA synthesis and ultimately cell death. This mechanism is particularly effective in rapidly dividing cancer cells, making it useful in chemotherapy.