Yellow head virus (YHV) is classified as one of the most serious pathogens causing a harmful disease in many penaeids, especially black tiger shrimp (Penaeus monodon), with high economic loss. To determine a potent and practical prophylactic strategy for controlling this disease, the toxicity of the by-product kraft lignin and its ability to control severe YHV infection were investigated in juvenile black tiger shrimp (15.9 ± 1.2 g body weight). The median lethal dosage at 96 h (96-hrs LD50) of lignin in shrimp was 297 mg/L. Lignin was further added to shrimp diets via top-dressing to assess its ability to elicit immune stimulation activity. At 14 days after feeding, shrimp fed 1, 3, 5 and 10 g of lignin/kg of diet exhibited significantly higher levels of phagocytic activity (PA) than the control group (P < 0.05). However, differences in total hemocyte count among treatments were not significant during the experimental period (P > 0.05). Additionally, lignin supplementation at 1-10 g/kg for 14 days failed to protect experimental shrimp against YHV infection. The antiviral activity of lignin against YHV in black tiger shrimp was notable in vitro because compared to control shrimp (96.7 ± 5.8%; P < 0.05), shrimp injected with a pre-incubated solution of YHV and lignin at 1, 5, 10 and 20 mg/L exhibited significantly lower mortality rates, 23.3 ± 5.8, 16.7 ± 5.8, 23.3 ± 5.8, and 20.0 ± 0.0%, respectively, after a lethal dose of YHV at 14–20 days after injection. These potent effects were clearly supported and confirmed by histopathological and RT-PCR analyses. Based on these results, the pulping by-product kraft lignin efficiently inhibits YHV infection in black tiger shrimp. This information will facilitate the development of practical methods to control yellow head disease in the marine shrimp culture industry.