A number of studies have revealed that there is an increasing incidence of early-onset colorectal cancer (CRC) in young adults (before the age of 50 years) and a progressive decline in CRC among older patients, after the age of 50 years (late-onset CRC). However, the etiology of early-onset CRC is not fully understood. The aim of the present study was to identify key genes associated with the development of early-onset CRC through weighted gene co-expression network analysis (WGCNA). The GSE39582 dataset was downloaded from the Gene Expression Omnibus database, and the data profiles of tissues from patients diagnosed before the age of 50 years were selected. The top 10,000 genes with the highest variability were used to construct the WGCNA. Hub genes were identified from the modules associated with clinical traits using gene significance >0.2 and module membership >0.8 as the cut-off criteria. Gene Ontology and pathway analyses were subsequently performed on the hub genes and a protein-protein interaction network (PPI) was constructed. The diagnostic value of module hub genes with a degree score >5 in the PPI network was verified in samples from patients with CRC diagnosed before the age of 50 years obtained from The Cancer Genome Atlas. Eight co-expressed gene modules were identified in the WGCNA and two modules (blue and turquoise) were associated with the tumor-node-metastasis stage. A total of 140 module hub genes were identified and found to be enriched in ‘mitochondrial large ribosomal subunit’, ‘structural constituent of ribosome’, ‘poly (A) RNA binding’, ‘collagen binding’, ‘protein ubiquitination’ and ‘ribosome pathway’. Twenty-six module hub genes were found to have a degree score >5 in the PPI network, seven of which [secreted protein acidic and cysteine rich (SPARC), decorin (DCN), fibrillin 1 (FBN1), WW domain containing transcription regulator 1 (WWTR1), transgelin (TAGLN), DEAD-box helicase 28 (DDX28) and cold shock domain containing C2 (CSDC2)], had good prognostic values for patients with early-onset CRC, but not late-onset CRC. Therefore, SPARC, DCN, FBN1, WWTR1, TAGLN, DDX28 and CSDC2 may contribute to the development of early-onset CRC and may serve as potential diagnostic biomarkers.