Using multiple-scale method, we study analytically the soliton dynamical behaviors of the Bose-Einstein condensates trapped in a square-well potential. It is found that the square-well potential has important effects on the soliton dynamics. When the soliton goes into the square-well potential, its movement is accelerated; while it leaves the square-well potential, the soliton is decelerated. With the increase in depth of the square-well potential, the velocity of the soliton increases, and its amplitude becomes larger and its width decreases. This may serve as a reference effect for controlling the dynamical characteristics of the soliton in experiments.