Molting is a key biological process of crustaceans, which is mainly regulated by 20-hydroxyecdyone (20E). The molting cycle could be divided into three main stages including pre-molt, post-molt and inter-molt stages. The mechanism of immune regulation during molting process still requires further exploration. Yorkie (Yki) is a pivotal transcription factor in the Hippo signaling pathway, and it plays an essential role in regulating cell growth and immune response. In the present study, a Yki gene was identified from Eriocheir sinensis (designed as EsYki), and the regulatory role of EsYki in controlling the expression of antimicrobial peptide genes throughout the molting process was investigated. The mRNA expression level of EsYki was higher at the pre-molt stage compared to the post-molt stage and inter-molt stage. Following the injection of 20E, there was a notable and consistent rise in the EsYki mRNA expression in haemocytes. The increase was observed from 3 h to 48 h with the maximum level at 12 h. And the phosphorylation of Yki in the haemocytes was also significantly up-regulated at 3 h post 20E injection. Moreover, the levels of EsYki mRNA expression at three molting stages were significantly increased post Aeromonas hydrophila stimulation. The maximum level was detected at post-molt stage following A. hydrophila stimulation, while the lowest level was observed at inter-molt stage. The expression pattern of EsCrus was in contrast to EsCrus. After EsYki mRNA transcripts were inhibited by Yki inhibitor (CA3), the mRNA expression levels of EsCrus1 and EsCrus2 following A. hydrophila stimulation were significantly elevated. Furthermore, the phosphorylation level of NF-κB was also increased following the inhibition of Yki. Collectively, our findings indicated that EsYki could be induced by 20E and has a suppressive effect on the expression of EsCrus via inhibiting NF-κB during molting process. This research contributes to the understanding of the immunological regulation mechanism during molting process in crustaceans.