Shrimp nursery rearing technology is increasingly being used by aquatic farmers and enterprises. Determining an appropriate density restriction in order to obtain a greater compensatory growth potential is the key to this technology. Based on the industry standards for indoor shrimp farming, three densities for Litopanaeus vannamei nursery rearing were examined (D1 [control] = 10,000 PL/m3, D3 = 30,000 PL/m3, and D5 = 50,000 PL/m3). The results showed that the D5 group had an over‐compensation growth effect, whereas the D3 group showed a full‐compensation growth effect. A preliminary investigation of the mechanism of compensatory growth was explored. The results showed that during the compensation stage, the SGR (Special Growth Rate) and FCE (Feed Conversion Efficiency) of the D5 group were significantly higher (p < 0.05) than the control. T‐SOD enzyme activity was not significantly different (p > 0.05) from the control. Antioxidants such as CAT, GSH‐PX and MDA all had compensatory changes. In addition, the relative mRNA expression of several genes was measured. The results showed that growth‐related genes (EGFR, MSTN), molting‐related genes (MIH), immune‐related genes (Toll) and digestion‐related genes (α‐amylase) had a relative compensation of mRNA expression. Meanwhile, transcriptome analysis of shrimps after different density restrictions in the compensation stage was performed. Totally 237 and 348 differentially expression genes (DEGs) were identified in the D5‐ and D3‐treated shrimps, respectively. In D5‐treated shrimps, DEGs were annotated and grouped into nine processes or pathways related to animal metabolic response. With respect to D3‐treated shrimps, DEGs were mainly annotated to 15 processes or pathways related to animal metabolic response. Therefore, this study provides a basis for the theory and practice of compensatory growth during the nursery rearing of commercial shrimp.