In this paper, we develop a new robust estimating equation approach for analysis of longitudinal data. To achieve robustness against outliers, we propose a novel approach which corrects the bias induced by outliers through centralizing the matrix of covariates in the estimating equation. To centralize the covariates, we subtract their conditional expectations, and the conditional expectations can be estimated by the local linear smoothing method. The consistency and asymptotic normality of the proposed estimator are established under some regularity conditions. Extensive simulation studies show that the proposed method is robust, has high efficiency, and is not limited to some specific error distributions. In the end, the proposed method is applied to the longitudinal study of prevalent patients with type 2 diabetes and confirms the effectiveness of dietary fibre intake in reducing glycolated hemoglobin A1c level.