We investigate the sensitivity of electron-proton (ep) colliders for charged lepton flavor violation (cLFV) in an effective theory approach, considering a general effective Lagrangian for the conversion of an electron into a muon or a tau via the effective coupling to a neutral gauge boson or a neutral scalar field. For the photon, the Z boson and the Higgs particle of the Standard Model, we present the sensitivities of the LHeC for the coefficients of the effective operators, calculated from an analysis at the reconstructed level. As an example model where such flavor changing neutral current (FCNC) operators are generated at loop level, we consider the extension of the Standard Model by sterile neutrinos. We show that the LHeC could already probe the LFV conversion of an electron into a muon beyond the current experimental bounds, and could reach more than an order of magnitude higher sensitivity than the present limits for LFV conversion of an electron into a tau. We discuss that the high sensitivities are possible because the converted charged lepton is dominantly emitted in the backward direction, enabling an efficient separation of the signal from the background.