Mechanistic insight into charge transportation behavior of the heterogeneous photocatalyst is a key issue to elucidate the photocatalytic performance. This study aims to employ first-principles calculations and tracking charge flow direction to reveal the charge transportation behavior and enhanced photocatalytic performance of CdS modified tetragonal phase BaTiO3 (BTO/CdS). The experiment of X-ray photoelectron spectroscopy and the first-principles calculations confirm the establishment of a built-in electric field and a type-II energy alignment, which are favorable for transport and separation of charge carriers in BTO/CdS heterojunction. The tracking charge flow direction demonstrates that photogenerated electrons of CdS transfer to BTO and photogenerated holes of BTO transfer to CdS. As a result, the constructed BTO/CdS heterojunction nanostructure exhibits substantially enhanced photocatalytic performance. The degradation rate of rhodamine B by BTO/CdS photocatalyst is 98.6 % under simulated light irradiation within 25 min, which is significantly higher than that (29.0 %) of the pure BTO photocatalyst. This study offers a rational strategy to understand the charge transportation behavior and enhanced photocatalytic performance of heterostructures by first-principles calculations and tracking charge flow direction for the design of high-performance photocatalysts.