Nitrogen and phosphorus limitation affect the growth, development, and productivity of lettuce, which exert a marked influence on metabolites. To compare the influence of low-nitrogen and low-phosphorus stresses on various metabolites of lettuce leaves, experiments were performed under three conditions of treatment—low-nitrogen stress, low-phosphorus stress, and normal samples. Metabolomic analyses were conducted based on ultra-performance liquid chromatography-quadrupole time-of-flight mass spectrometry. Principle components analysis yielded distinctive clustering information among the holistic samples; fold change analysis, t-test and orthogonal partial least square discriminant analysis were used for the selection of metabolic biomarkers. Ten pathways were selected which were significantly enriched by metabolic biomarkers. Metabolic biomarkers were screened by fold change (FC) value, p-value and variable importance in the projection (VIP) value, low-nitrogen and low-phosphorus stresses caused an increase in 16 metabolites (FC > 2, p-value < 0.05, VIP > 1) and a decrease in 26 metabolites (FC < 0.5, p-value < 0.05, VIP > 1). Outside of these, our results showed that inositol, p-hydroxybenzoic acid, stachyose, dinoseb, and 7, 8-dihydroxycoumarin increase in low-nitrogen stress samples. Low-phosphorus stress caused accumulation of citrate, isocitrate, l-5-oxoproline, succinate, and histamine, which may be considered potential metabolic biomarkers. The metabolites could be used to monitor the nitrogen and phosphorus status of lettuce and to guide appropriate fertilization regimens.