Hepcidin belongs to a class of small cationic antimicrobial peptides rich in cysteine. It is synthesized by liver and is widely involved in host antimicrobial, antiviral and other immune responses. We identified and characterized three hepcidin genes (OpHep1, OpHep2 and OpHep3) in spotted knifejaw. All the OpHeps shared high identities with hepcidins in other teleost, containing alpha helix and β-sheets. Three OpHeps were all detected in healthy tissues, with the abundant expression in liver. They were significantly increased after Vibrio harveyi infection in the six immune-relevant tissues (liver, kidney, spleen, gill, skin and intestine). OpHeps knockdown in spotted knifejaw liver cells affected the mRNA levels of inflammation-related genes, including il1β, il6, il8, and nfκb. Further, the recombinant hepcidin proteins were effective in suppressing the growth of both Gram-negative and Gram-positive bacteria. To identify the function of OpHeps in vivo, we performed the overexpression of three OpHeps in zebrafish, and found OpHeps could significantly induce immune-related genes expression in transgenic zebrafish, including myd88, il10, il21, il16, tlr1, tlr3 and lysozyme. When infected with V. harveyi, OpHeps transgenic zebrafishes had a higher survival rate than wild-type zebrafishes. The expression of myd88, il10, il8, il1β, nfκb and lysozyme were all significantly up-regulated in transgenic fishes during bacterial infection. In summary, these results indicated that hepcidin could protect fish fight against pathogen through TLR/NFκB signaling cascade and Lysozyme. Three OpHeps would be potential targets for prevention of bacterial infections in aquaculture industry of spotted knifejaw, which provided a new idea for the molecular breeding of fish disease resistance.