A quasi 1D model of two-phase flow for a urea-selective catalytic reduction (SCR) system is developed which can calculate not only the generation of reducing agent but also the formation of deposits in the exhaust pipe. The gas phase flow is solved through Euler method, variables are stored on staggered grids, and the semi-implicit method for pressure-linked equation (SIMPLE) algorithm is applied to decouple the pressure and velocity. The liquid phase is treated in a Lagrangian way, which solves the equations of droplet motion, evaporation, thermolysis, and spray wall interaction. A combination of a direct decomposition model and a kinetic model is implemented to describe the different decomposition behaviors of urea in the droplet phase and wall film, respectively. A new 1D wall film model is proposed, and the equations of wall film motion, evaporation, thermolysis, and species transport are solved. The position, weight, and components of deposits can be simulated following implementation of the semi-detailed kinetic model. The simulation results show that a decrease in the exhaust temperature will increase the wall film region and the weight of deposits. Deposit components are highly dependent on temperature. The urea-water-solution (UWS) injection rate can affect the total mass of wall film and expand the film region, but it has little influence on deposit components. An increase in exhaust mass flow can decrease the total weight of deposits on the pipe wall because of the promotion of the mass and heat transfer process both in the droplets and wall film.