The swimming crab (Portunus trituberculatus) is an important marine economic species, however its artificial breeding yield is relatively low. Currently, the main challenge faced by the swimming crab seed industry is the reliance on wild populations for seed cultivation, which results in unstable yield and quality, affecting the healthy development of the crab farming industry to some extent. The quality of germplasm resources depends on the quality of gametes, and the quality of sperm depends on the orderly genetic regulation process of spermatogenesis. Therefore, elucidating the genetic regulatory mechanisms of spermatogenesis is of great significance for improving the germplasm resources of P. trituberculatus. To gain a deeper understanding of this process, we conducted a comparative transcriptome study on the testis of the swimming crab at different developmental stages. This study aims to identify key genes that regulate testicular development. We performed paraffin section identification on the testicular tissue of male crabs and conducted transcriptome analysis on the testicular tissue at five different developmental stages and somatic cells. Through differential expression analysis, we screened a total of 31,788 differentially expressed genes (DEGs) from stages I to VI. Through Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analysis, we found that these DEGs were significantly enriched in 15 pathways, including important functional pathways such as the adrenergic signaling pathway, HIF-1 signaling pathway, and TGF-β signaling pathway. GO analysis results showed that calcium ion homeostasis and cell skeleton-related activities were significantly enriched in stage II. Further protein-protein interaction network analysis revealed 68 hub genes, including 13 eukaryotic initiation factors, 6 Ras superfamily members, and 6 genes related to cell division. In addition, genes such as Actin, Myosin, and Nup50 consistently showed high expression at all developmental stages, while genes related to calcium ion homeostasis, such as CaM, significantly increased in expression during stage II. Hsp90 and apoptosis-related genes had higher expression in stage IV, while Smad4 had higher expression in stage V. These results suggest that stage II of the swimming crab sperm development may be a critical period for spermatogenesis, and stage IV may be an important period for regulating sperm quality and quantity. This study not only provides a foundation for further research on the molecular mechanisms of testicular development and spermatogenesis in the swimming crab but also offers theoretical support for improving breeding yield, which has significant practical application value.