China Spallation Neutron Source phase-II (CSNS-II) upgrade project will build the first Muon Source MELODY (Muon station for sicEnce, technoLOgy and inDustrY) in China based on the high power proton accelerator. During the first stage, a muon target station and a surface muon beam-line will be constructed before 2029. The surface muon beam-line will focus on the applications of muon spin \(\mu\)SR spectroscopy. At the target station, muons are generated by proton pulses hitting the muon target and captured by a large aperture solenoid. However, a lot of positrons are also generated along with muons. These positrons have the same momentum as the muons and can be transport along the beam line. These positrons must be eliminated otherwise they will arrive at the spectrometer and disturb the signals induced by the interaction between the muons beam and the experimental samples. Wien filter is the key device in the beam-line to remove the positrons from the muon beam. A Wien filter consists of a dipole magnet and a high voltage electrostatic separator and can simultaneously generate the magnetic field and electric field perpendicularly to each other. Muons with velocity that equals to the ratio of the electric filed to the magnetic field (\(v=E/B\)) can pass through the Wien filter without deflection. Meanwhile, positrons move much faster than muons resulting in a significant deflection. The optimization of the Wien filter structure can improve the field quality to make the E/B as constant as possible along the beam path and thus minimize the deflections to muons. This paper introduces the design details of a Wien filter at MELODY.