The invention discloses a system and a method for desulfurizing, denitrifying and removing mercury based on photoactivation ammonium persulfate. The system is mainly provided with a boiler or kiln, a deduster, a flue gas temperature regulator, a photochemistry reactor, a liquid spraying system as well as a byproduct post-processing system. Flue gas discharged from the boiler or kiln enters the photochemistry reactor arranged on a flue channel after being subjected to dedusting and temperature regulation, and an ammonium persulfate solution from the liquid spraying system is sprayed into the photochemistry reactor in a mist form; an UV (ultraviolet) lamp in the photochemistry reactor emits UV light to perform catalytic decomposition on ammonium persulfate, releases sulfate radical free radicals with high oxidizing property (SO4-.), and meanwhile oxidizes and removes SO2, NOx and mercury in the flue gas. Oxidized products are subjected to resource utilization after being processed by the byproduct post-processing system. The method has the prominent advantages that the method can be used for removing multiple pollutants in coal burned flue gas synchronously, has no secondary pollution during removing, and can be used for transforming aging units and the like, and the system is a novel flue gas purifying system with a wide application prospect.