As an important sequential work of the S-wave ( ) meson production at the large hadron electron collider (LHeC), we investigate the production of the P-wave excited states (1P1 and 3PJ with J = 0, 1, 2) via photoproduction mechanism within the framework of nonrelativistic QCD at the LHeC. Generally, the process is considered as the main production mechanism at an electron–proton collider due to the large luminosity of the gluon. However, according to our experience on the S-wave meson production at the LHeC, the extrinsic production mechanism, i.e., and , could also provide dominating contributions at low pT region. A careful treatment between these channels is performed and the results on total and differential cross sections, together with main uncertainties are discussed. Taking the quark masses mb = 4.90 ± 0.40 GeV and mc = 1.50 ± 0.20 GeV into account and summing up all the production channels, we expect to accumulate , and events at the LHeC in one operation year with luminosity cm−2 s−1. With such sizable events, it is worth studying the properties of excited P-wave states at the LHeC.