Different soil nutrients affect the accumulation characteristics of plant metabolites. To investigate the differences among the metabolites of pepino grown in greenhouses on the Loess Plateau in northwest China, we investigated the main soil nutrients and their correlation with metabolites. A total of 269 pepino metabolites were identified using UPLC-QTOF-MS to detect metabolites in fruits from three major pepino growing regions and analyze their differential distribution characteristics. A total of 99 of these substances differed among pepino fruits from the three areas, and the main classes of the differential metabolites were, in order of number: amino acids and derivatives, nucleotides and derivatives, organic acids, alkaloids, vitamins, saccharides and alcohols, phenolic acids, lipids and others. An environmental factor analysis identified soil nutrients as the most significant differentiator. Five soil nutrient indicators: TN (total nitrogen), TP (total phosphorus), AP (available phosphorus), AK (available potassium), and OM (organic matter), exhibited significant differences in three growing sites. Metabolite and soil nutrient association analysis using redundancy analysis (RDA) and the Mantel test indicated that TN and OM contributed to the accumulation of amino acids and derivatives, nucleotides and derivatives, and alkaloids while inhibiting organic acids, vitamins coagulation biosynthesis. Moreover, AP and TP were associated with the highest accumulation of saccharides and, alcohols, phenolic acids. Consequently, differences in soil nutrients were reflected in pepino metabolite variability. This study clarified the metabolite variability and the relationship between pepino and soil nutrients in the main planting areas of northwest China. It provides a theoretical basis for the subsequent development of Pepino’s nutritional value and cultivation management.