Chloride transport by microbial rhodopsins is an essential process for which molecular details such as the mechanisms that convert light energy to drive ion pumping and ensure the unidirectionality of the transport have remained elusive. We combined time-resolved serial crystallography with time-resolved spectroscopy and multiscale simulations to elucidate the molecular mechanism of a chloride-pumping rhodopsin and the structural dynamics throughout the transport cycle. We traced transient anion-binding sites, obtained evidence for how light energy is used in the pumping mechanism, and identified steric and electrostatic molecular gates ensuring unidirectional transport. An interaction with the π-electron system of the retinal supports transient chloride ion binding across a major bottleneck in the transport pathway. These results allow us to propose key mechanistic features enabling finely controlled chloride transport across the cell membrane in this light-powered chloride ion pump.