Koi herpesvirus specifically infects and causes mass mortality on koi and carp, resulting in severe economic losses. In this study, we presented the efficacy of KHV DNA vaccine administration by immersion method on Cyprinus carpio. Two different immersion densities of fish were applied, namely 800 fish L−1 and 1200 fish L−1. Thirty‐day‐old common carp juveniles were immersed for 30 min in the water containing 1.3 × 108 CFU mL−1 of heat‐killed Escherichia coli carrying DNA vaccine encoding glycoprotein‐25, and without vaccination treatment as controls. The challenge test was performed at 30 days post vaccination by injecting 0.1 mL KHV filtrate (10−3 of dilution rate). The result showed that higher relative per cent survival of KHV‐challenged fish was obtained in 800 fish L−1 (P < 0.05). Furthermore, significant specific antibody anti‐KHV response (P < 0.05) was detected on 28 and 36 days post vaccination in 800 and 1200 fish L−1, respectively, compared to the controls there was no specific antibody detected. In conclusion, the KHV DNA vaccine could provide good protection in common carp against KHV infection, which has practical applications in aquaculture practices.