In this paper, we investigate theoretically the Stark deceleration and cooling of subsonic NH3 molecular beams based on our second-generation electrostatic Stark decelerator with 180 stages. Firstly, we calculate the Stark shifts of NH3 molecules in the|J =1, K =1?states and show the stable area of longitudinal phase space for different synchronous phase angles. Secondly, we study the slowing performance of NH3 molecular beams in the traditional mode, and discuss the relationships between various parameters (such as the kinetic energy loss per stage, final velocity and the slowing e?ciency) and the synchronous phase angle ?0, as well as the dependence of final velocity on the applied voltages. It is found that a subsonic NH3 molecular beam can be decelerated from 280 to 6.7 m/s at ?0 = 26.08? when the high voltages applied on the electrodes are ±13 kV, corresponding to a removal of 99.9% kinetic energy. The translational temperature of the molecular packets in the moving frame is significantly reduced from 1.34 K to 80 mK. Finally, we study the slowing performance of NH3 molecules and the dependence of final velocity on the synchronous phase angle in an alternate operation mode. In this mode, a synchronous phase angle?0=0?is chosen to bunch the molecules by using the first 15 stages. The remaining 165 stages are then used to slow a subsonic molecular beam at a certain synchronous phase angle. Our result shows that a molecular beam with a mean velocity of 280 m/s can be decelerated to 20.7 m/s at ?0 =65.4? when the voltages applied are ±6.5 kV, indicating a 99.4% kinetic energy removal, and the translational temperature of the molecular packets can be reduced from 1.34 K to 1.6 mK. By comparing the results obtained from the two operational modes, the temperature of the slowed molecular packet in the alternate mode is 50 times lower than that in the traditional mode. It is shown that our second-generation 180-stage Stark decelerator can effectively produce slow and cold molecules with relatively small electric dipole moment like NH3. These monochromatic NH3 molecular beams offer a promising starting point for high resolution spectroscopy, precision measurement, cold collisions and cold chemistry. This theoretical work provides a reliable basis in our further experimental research.