Magnesium and its alloys have many applications for theirs excellent physical and mechanical properties. Due to magnesium’s active chemical properties and difficulties in direct painting, a novel environmental protective water based coating was developed, which mainly contains metal flake, silicate, silane and sodium polyphosphate etc. The properties and structure of the coating were investigated by adhesion test, hardness test, heat resistance test, neutral salt spray test and Scanning Electron Microscopy (SEM) et al. Meanwhile, the effect of sodium polyphosphate was also examined by hydrogen evolution test and electrochemical test. Furthermore, the film forming mechanism of the coating was explored by Fourier Transform Infrared spectroscopy (FTIR). Results showed that the coating had a stepped structure which could achieve extraordinary adhesion, 350°C temperature heat resistance, HV0.50/30 210 hardness and 300 hours anti-corrosion time in salt spray test. In the coating, the addition of sodium polyphosphate could greatly improve the corrosion resistance of the coating because of the barrier film formed by sodium polyphosphate. The mechanism of interpenetrating polymer network (IPN) was preliminary put forward based on the results of FTIR.