With the increasing price and demand for fishmeal (FM) in aquaculture feeds, Tenebrio molitor (TM), an insect species known as yellow mealworm, is becoming an attractive alternative to FM in the aquaculture industry. This study investigated the effect on growth, enzyme activity, resistance to Vibrio parahaemolyticus, intestinal microbiota, and hemolymph transcriptome in Litopenaeus vannamei (Pacific white shrimp) of replacing up to 45% of FM with TM. L. vannamei (initial weight: 0.42 ± 0.01 g) were fed with diets that replaced FM with TM at 0% (TM0, control), 15% (TM15), 30% (TM30), and 45% (TM45). The results showed that dietary TM30 significantly increased the final body weight (FBW), weight gain rate (WGR), and specific growth rate (SGR) of L. vannamei (P < 0.05) when compared with TM0. For the enzyme activity of serum, alkaline phosphatase (AKP), catalase (CAT), superoxide dismutase (SOD), phenoloxidase (PO), and lysozyme (LZM) differed significantly in TM45 compared with TM0 (P < 0.05), and malondialdehyde (MDA) decreased. The trypsin in the intestine significantly increased in TM45 compared with TM0 (P < 0.05). In the shrimps challenged with V. parahaemolyticus (1.3 × 107 CFU/mL), survival rates were not significantly different between groups. The alpha diversity indicators were significantly affected by feeding different levels of TM (P < 0.05), and beta diversity analysis showed that the four groups differed significantly (P < 0.05). Based on IndVal values, eight families were distinguished. RNA-seq analysis showed that the most enriched pathway was ‘Metabolism of xenobiotics by cytochrome P450’. Some DEGs (differentially expressed genes) of the cytochrome P450 pathway correlated with the abundance of intestine bacteria at the family level. This study provides an insight into the mechanisms associated with molecular and microbiota responses to the effects of substituting TM for FM on L. vannamei, as well as suggests that TM is a potential protein source for farmed L. vannamei, possibly improving its antioxidant capacity, immunity, and resistance to disease via the cytochrome P450 pathway.