In a seminal paper, Robins (1998) introduced marginal structural models (MSMs), a general class of counterfactual models for the joint effects of time-varying treatment regimes in complex longitudinal studies subject to time-varying confounding. He established identification of MSM parameters under a sequential randomization assumption (SRA), which rules out unmeasured confounding of treatment assignment over time. We extend Robins' MSM theory by considering identification of MSM parameters with the aid of a time-varying instrumental variable, when sequential randomization fails to hold due to unmeasured confounding. Our identification conditions essentially require that no unobserved confounder predicts compliance type at each follow-up time. Under this assumption, we obtain a large class of semiparametric estimators that extends standard inverse-probability weighting (IPW) and includes multiply robust estimators, including a locally semiparametric efficient estimator.  The approach provides a unified solution to IV inference from point exposure to time-varying exposure settings, including mean models with possibly nonlinear link functions, quantile MSMs and time to event models such as Cox MSMs. Finally, we briefly discuss recent robust IV methods that further allow for violation of the core IV identifying condition, the exclusion restriction assumption, without compromising inference.