These findings validate <i>ortho</i>-hydroxyanilides as effective HDAC1/HDAC2-selective inhibitors and highlight photocaging as a promising strategy to achieve spatiotemporal control of epigenetic therapies in cancer. This evidence concerns the gene HDAC1 and cancer.