In this paper, we extend the proximal causal inference framework of Tchetgen Tch-etgen, Ying, et al. (2020), and Cui et al. (2020) to the longitudinal setting under a semiparametric marginal structural mean model (MSMM). The longitudinal proximal inference approach we propose offers an opportunity to learn about joint causal effects in settings where SRA on the basis of measured time-varying covariates fails, by formally accounting for the covariate measurements as imperfect proxies of underlying confounding mechanisms. We establish sufficient conditions for nonparametric identification with the aid of a pair of time-varying proxies when sequential randomization fails to hold due to unmeasured confounding. We provide a characterization of all regular and asymptotically linear estimators of the parameter indexing the MSMM, including a rich class of doubly robust estimators, and establish the corresponding semiparametric efficiency bound for the MSMM. Our approach is illustrated via extensive simulation studies and a data application on potential protective effects of the anti-rheumatic therapy Methotrexate (MTX) among patients with rheumatoid arthritis.