Cooking can lead to varying degrees of nutrient loss in purple rice. For this investigation, two varieties of purple rice (YZN1 and YZ6) were chosen as the focal points to explore the metabolites associated with rice nutrition post cooking using nontargeted and targeted metabolomics techniques. The results showed that after cooking the two purple rice varieties, the contents of the flavonoids; OPC; TP; total antioxidant capacity; and K, Na, Fe, Mn, Zn, Cu, Ca, and Mg significantly decreased. Compared with YZN1U (YZN1 uncooked), the amino acid and mineral element contents in YZN1C (YZN1 cooked) decreased to varying degrees. After cooking YZ6, the contents of seven amino acids significantly decreased. Following the preparation of purple rice, the metabolites primarily engaged in the pathways of flavonoid synthesis and flavone and flavonol synthesis. Flavonoids, total antioxidant capacity, mineral elements, and amino acids showed a strong correlation with delphinidin and luteolin. The ROC analysis demonstrated that the value of the area under the curve for delphinidin and luteolin was 1 when comparing YZ6C (YZ6 cooked) and YZ6U (YZ6 uncooked), as well as YZN1C and YZN1U. Delphinidin and luteolin can be used as potential biomarkers of nutrient loss after cooking purple rice. This study holds significant implications for the balanced nutrition and healthy development of human dietary grains.