This survey has shown, using the Monte Carlo N-Particle(MCNP) code to model a detection system, to demonstrate that it is possible to design a system to measure hazard elements in polluted water. At first, the measurement method needs to be determined. For measuring the specimen component without knowing the accuracy concentration in a short time, when compared with other methods, the Energy-dispersive X-ray fluorescence (ED-XRF) is a good choice for solving this problem. Then, a basic part of this method and actual experiment setting is using the simulation to find the suitable parameters such as the input X-ray energy level, the detector thickness, etc. At last, the polluted water has been measured for evaluating the system function.