The invention discloses a denitration and ammonia spraying control system for a W-flame boiler and a method thereof. The system comprises an SCR inlet NOx concentration module, an SCR outlet NOx concentration setting module, an SCR outlet NOx concentration module, a boiler real-time flue gas flow calculation module, an ammonia gas flow module, a boiler combustion state variable module, an NOx quantity module theoretically needing to be removed, a combustion state estimation controller, a static deviation controller, a theoretical ammonia-nitrogen molar ratio module, an arithmetic operator module, an ammonia flow controller, and an ammonia flow regulating valve. A control strategy of a feedforward loop, an estimation loop, and a feedback loop is set, and a state estimation controller, an NOx quantity module theoretically needing to be removed and a static deviation controller are correspondingly arranged. According to the control method, denitration optimization control and precise ammonia spraying of the W-flame boiler can be achieved in any DCS and any external system configuration of the DCS, and partition dynamic precise ammonia spraying optimization can be achieved in cooperation with SCR partition.