Cucumber (Cucumis sativus L.) is a crucial vegetable crop, requiring significant nitrogen fertilizer inputs. However, excessive nitrogen application not only impairs growth but also poses severe environmental risks. Thus, enhancing nitrogen use efficiency (NUE) in cucumber is imperative. For the identification of genes associated with NUE in cucumber, roots of high NUE and low NUE lines were analyzed under high nitrogen conditions. Using transcriptome sequencing through WGCNA, a total of 15,180 genes were categorized into 35 co-expression modules, with 5 modules being highly correlated with NUE. Based on differential expression within the five modules and the results of GO and KEGG enrichment analyses, 25 genes were identified as potentially related to NUE. Among these, CsaV4_1G002492 (GLR22), CsaV4_2G003460 (GLR35), CsaV4_3G000307 (NRT1.1), and CsaV4_7G001709 (UPS2) were homologous to genes in Arabidopsis known to directly participate in NUE related process. These four genes were chosen as key genes for further analysis. qRT-PCR analysis revealed that CsaV4_3G000307 and CsaV4_7G001709 were more active during the early stages of the high nitrogen treatment in the high NUE line. Conversely, CsaV4_1G002492 and CsaV4_2G003460 were more active in the low NUE line. Using transcriptomic analysis, a frameshift INDEL mutation was observed in CsaV4_3G000307 in the low NUE line, which impacted the compactness of the protein structure, potentially altering its function. Analysis of protein interactions of these four key genes predicted some potential interaction networks. This research offers critical insights into the genetic factors influencing NUE in cucumber, presenting potential targets for genetic modification or breeding programs.