This study revealed the molecular mechanisms following infection of C. japonica by A. hydrophila and immersion in berberine hydrochloride. Exposure to berberine hydrochloride altered the expression of genes involved in glutathione metabolism, oxidative phosphorylation, fatty acid degradation, retinol metabolism, pyruvate metabolism, HIF-1 signaling, and other pathways. Berberine hydrochloride may thus have an adjuvant therapeutic effect against A. hydrophila infection. Transcriptome analysis showed that berberine-soaked C. japonica adapted to A. hydrophila invasion by increasing the expression levels of genes involved in the lysosome and endophagosome, and anaerobic respiration-related genes. These transcriptomic data for the effects of berberine hydrochloride on C. japonica provided strong support for its further development as a therapeutic anti-bacterial agent. The results of this study provided a new scientific basis for the potential role of berberine hydrochloride in protecting crustaceans against bacterial infections in aquaculture. It also provided an additional option for the use of secondary metabolites to replace antibiotics in the treatment of bacterial diseases in aquatic animals.