Compared with two-photon point-scanning microscopy, two-photon temporal focusing microscopy (2pTFM) provides a parallel high-speed imaging strategy with optical sectioning capability. Owing to out-of-focus fluorescence induced by scattering, 2pTFM suffers deteriorated signal-to-background ratio (SBR) for deep imaging in turbid tissue, Here, we utilized the photobleaching property of fluorophore to eliminate out-of-focus fluorescence. According to different decay rates in different focal depth, we extract the in-focus signals out of backgrounds through time-lapse images. We analyzed the theoretical foundations of photobleaching imprinting of the line-scanning temporal focusing microscopy, simulated implementation for background rejection, and demonstrated the contrast enhancement in MCF-10A human mammary epithelial cells and cleared Thy1-YFP mouse brains. More than 50% of total background light rejection was achieved, providing higher SBR images of the MCF-10A samples and mouse brains. The photobleaching imprinting method can be easily adapted to other fluorescence dyes or proteins, which may have application in studies involving relatively large and nontransparent organisms.