In this paper, a model predictive control algorithm to restrain bullwhip effect of Dual-channel closed-loop supply chain networks dynamic system under E-commerce environment is studied. First, the state space dynamic model of Dual-channel closed-loop supply chain model under E-commerce environment is established; A iota(2) norm measure method of bullwhip effect is presented; Based on the established system prediction model, the calculation formula of state estimation and prediction are given; the multi-stage optimal prediction model expressions are deduced; the objective function and the feedback correction method are given; the constrained optimization algorithm based on quadratic optimization is derived; and the general steps of this algorithm is given; Finally, by an example, the effectiveness of the algorithm is verified. The essence of this algorithm is that with applying the rolling optimization and continuous implementations, adjusting the control variables such as the order quantity and production, the system has good dynamic performances in the premise of stability, the bullwhip effects are restrained.