Control of the biped robots requires appropriate gait planning that satisfies stable walking. In this paper, first a desired trajectory for the lower body will be designed by fitting proper polynomials at appropriate break points, which alleviates the impacts due to contact with the ground. Then, the upper body motion is planned based on the zero moment point (ZMP) criterion to provide a stable motion for the biped robot. Next, dynamics equations will be obtained for both the single support phase (SSP) and the double support phase (DSP). Finally, the sliding mode control (SMC) approach is applied for both the SSP and the DSP. To this end, a new chattering elimination method using fuzzy system will be proposed based on regulating major controller parameters. Obtained results show that the performance of the SMC in terms of the tracking errors will be fine even in the presence of considerable uncertainties. Also, the new proposed method substantially reduces chattering effects and avoids the instability of the biped robot due to chattering.