We examine the potential of the process ep → eγ * γ * p → eττ p at the Large Hadron Electron Collider (LHeC) and the Future Circular Hadron Electron Collider (FCC-he) to examine nonstandard ττ γ coupling in a model independent way by means of the effective Lagrangian approach.We perform pure leptonic and semileptonic decays for τ − τ + production in the final state. Furthermore, we use L = 10, 50, 100, 300, 500, 1000 fb −1 with at √ s = 1.30, 1.98, 7.07, 10 TeV and we consider systematic uncertainties of δ sys = 0, 5, 10%. The best sensitivity bounds obtained from the process ep → eγ * γ * p → eττ p on the anomalous couplings are −0.0025 <ã τ < 0.0009 and |d τ | < 8.85 × 10 −18 e cm, respectively. Therefore, our results show that the process ep → eγ * γ * p → eττ p at the LHeC and FCC-he are a very good prospect for probing the anomalous magnetic and electric dipole moments of the τ lepton at γ * γ * mode of the future ep collider.