The Centropristis striata is an important economically marine fish and facing a serious threat from various pathogens. Edwardsiella piscicida is one of the fish pathogens that seriously infect cultured and wild fish species. To understand the molecular immune mechanisms underlying the response to E. piscicida, a comparative gene transcription analysis was performed through RNA‐Seq technology. The low‐quality sequences were excluded, and the high‐quality sequences were assembled into a total of 60,759 contigs with an average length of 988.95 bp. A gene ontology (GO) analysis was employed to classify 5744 genes according to three major functional categories: molecular function, cellular component and biological process. A total of 19,918 genes were successfully annotated into 26 functional categories according to the clusters of orthologous groups (COG) classification. Furthermore, 15,006 genes were classified into 332 KEGG pathways. The q‐value was introduced to estimate 5109 genes significantly differentially expressed which includes 1781 up‐regulated genes and 3328 down‐regulated genes. The differentially expressed genes were involved in the major immune‐related pathways which refer to the pathogen recognition, inflammation, Toll‐like receptor and chemokine signalling pathways. Moreover, 24,487 potential simple sequence repeats (SSRs) and 193,760 candidate single nucleotide polymorphisms (SNPs) were detected and identified in the C. striata liver transcriptome. This work not only provides a valuable resource for further understanding of the antibacterial molecular mechanism of C. striata but also contributes to facilitate future studies on gene expression and functional genomics.