Soilless cultivation is increasingly utilized in supplying essential nutrients for greenhouse crops. However, the impact of coir cultivation under varying electrical conductivity (EC) conditions on cucumber growth and fruit quality, particularly through the regulation of gene expression during the vegetative stage, remains uncertain. In this study, we performed metabolic measurements on cucumber in both vegetative and reproductive stages under three different EC conditions and found metabolic products such as some primary metabolites (cellulose, many uncharged amino acids) and some secondary metabolites (rutin, cucurbitacin B) accumulated the most under EC of 5 dS·m−1. Next, we conducted transcriptome profiling in cucumber leaves, revealing that the function of genes significantly regulated by EC was associated with photosynthesis, many anabolic processes, and membrane transport. Finally, a set of genes contributed to metabolites related to the fruit quality of cucumber were identified by the Orthogonal Partial Least Squares (O2PLS) analysis, including genes involved in the biosynthesis of amino acids, polysaccharides, and many secondary metabolites. Taken together, these findings suggest that coir cultivation in greenhouses with moderate EC can induce a transcriptome-wide change in gene expression, thereby contributing to enhancing the abundance of metabolites associated with cucumber fruit quality.