Viral diseases are a serious issue for the shrimp aquaculture industry. White spot syndrome virus (WSSV) has been considered one of the most dangerous pathogens infecting cultured shrimp, causing a mortality rate as high as 100% within 7-10 days of viral infection. So far, several protocols have been applied to protect shrimp against virus attacks, but their protection efficiency is very limited. In this study, for the first time, three melanin-containing feedstuffs (F1, F2, and F3) were formulated and fed to cultured shrimp to investigate the ability of melanin to protect shrimp from WSSV. The obtained results showed that F2 had a protection rate of 64% at day 7 and 62% at day 10 after virus challenge. The protection ability of the feedstuff depended on the amount of melanin consumed by shrimp. Moreover, our results also demonstrated that the transcription level of the VP28 gene, which codes for the VP28 protein, a representative for the presence of WSSV, was significantly decreased in shrimp fed F2. Taken together, our study suggests that melanincontaining diets may be applied in aquaculture to protect shrimp against WSSV infection; further, combined protocols with the simultaneous use of melanin-containing diets and other protectants should be studied and applied to increase the protection efficiency.