Thioguanine functions primarily by incorporating into DNA and RNA, leading to the disruption of nucleic acid synthesis and function. This incorporation results in cytotoxicity, as it interferes with the replication and repair of DNA, ultimately inducing apoptosis in rapidly dividing cells. The drug is a prodrug that requires intracellular conversion to thioguanine nucleotides for activity.