Based on the finite element method, the numerical solution of the shallow-water equation for one-dimensional (1D) unsteady flows was established. To respect the stability criteria, the time step of the method was dependent on the space step and flow velocity. This method was used to avoid the restriction due to the wave celerity variation in the computational analysis when using the method of characteristics. Furthermore, boundary conditions are deduced directly from the scheme without using characteristics equations. For the numerical solution, a general-purpose computer program, based on the finite element method (FEM), is coded in fortran to analyze the dynamic response of the open channel flow. This program is able to handle rectangular, triangular, or trapezoidal sections. Some examples solved with the finite element method are reported herein. The first involves routing a discharge hydrograph down a rectangular channel. The second example consists of routing a sudden shutoff of all flow at the downstream end of a rectangular channel. The third one deals with routing a discharge hydrograph down a trapezoidal channel. These examples are taken from the quoted literature text book. Numerical results agree well with those obtained by these authors and show that the proposed method is consistent, accurate, and highly stable in capturing discontinuities propagation in free surface flows.