The invention relates to a method for separating halogen ions such as chlorine, fluorine and the like from sulfate, which comprises the following steps: pretreating stock solution, namely performing pretreatment such as conditioning, removing oil, removing suspended matters and the like on the sulfate stock solution; separating by using a nanofiltration membrane, and separating halogen ions such as chlorine, fluorine and the like in sulfate by using the nanofiltration membrane; treating the nanofiltration retentate, wherein the nanofiltration retentate is sulfate solution separated from halogen ions such as chlorine, fluorine and the like, and the nanofiltration retentate returns to a sulfate circulating system or a production system of a main device; treating the nanofiltration permeate solution, wherein the nanofiltration permeate solution is a separated halide solution such as chlorine, fluorine and the like, and concentrating and crystallizing the permeate solution to prepare a halide product such as chlorine, fluorine and the like. The method comprises the following steps: separating halogen ions such as chlorine, fluorine and the like in sulfate by using a nanofiltration membrane, and selecting the nanofiltration membrane with the aperture of 0.1nm-8.5nm and high separation efficiency of monovalent ions and multivalent ions, thereby reducing the halogen ions such as chlorine, fluorine and the like in the sulfate.