Extracts from plant products can promote growth, can act as immunostimulants, and have antibacterial and antiparasitic properties. These extracts can be used as alternatives to the chemical treatments commonly used to prevent and control disease in aquatic species. Research on the subject has focused on identifying invasive plants or agricultural waste products that can be used as immunostimulants. The present study further identified an optimal means of extracting pectin from cacao pod husks to promote growth performance and immunocompetence in Litopenaeus vannamei that would both reduce production costs and enable waste recycling. The byproducts of pectin extraction from cacao pod husks, that is, dried cacao pod husk powder (DCP), steamed DCP (sDCP), hot water–treated cacao pod husk powder (HCP), hot water–treated cacao pod husk supernatant (HCS), and cacao pod husk pectin (CPH pectin), were used to create five experimental diets, which were administered to five groups. The control group was fed a basal diet. The growth and immunocompetence of the shrimp were determined after 30, 60, 90 and 120 days of feeding. To identify the most cost-effective means of obtaining dried cacao pod husks, this study firstly determined the costs and effectiveness of the sun-drying, dehumidification, and heated-wind drying techniques. According to the results of growth performance, the CPH pectin group had higher survival but lower weight gain than the DCP, sDCP, HCP, and HCS groups did. At 30, 60, and 90 days, the clearance efficiency of the experimental groups was higher than that of the control group. At 60 days, the experimental groups had significantly higher phagocytic activity than the control group did. However, at 30 and 90 days the HCP, HCS and CPH pectin group had higher phagocytic activity. The total hemocyte count, differential hemocyte count, phenoloxidase activity, and respiratory bursts of the CPH pectin group were higher at 30 days but the same as those of the control group at 60 and 90 days. After 120 days of feeding trial, the resistance of L. vannamei fed with diets containing byproducts of pectin extraction from cacao pod husks significantly enhanced compared to that in BD group when they were infected with Vibrio aliginolyticus for 168 h, and the related higher survival rate can be observed in HCP, HCS and CPH pectin groups. The study findings suggest that diet-administered HCP and HCS have long-term immunostimulant potential and that CPH pectin has potential in the early stages of feeding. In addition, when heated air drying was employed, a moisture level of below 10% was obtained within 12 h. The results of this study indicate that adding HCP obtained from heated air–dried cacao pod husks to the feed of L. vannamei is the most cost-effective and sustainable means of promoting long-term growth performance and immunocompetence in the species.