Wolfberry (Lycium barbarum) is a traditional cash crop in China and is well-known worldwide for its outstanding nutritional and medicinal value. Lycium ruthenicum is a close relative of Lycium barbarum but differs significantly in size, color, flavor and nutritional composition. To date, the metabolic differences between the fruits of the two wolfberry varieties and the genetic basis behind them are unclear. Here, we compared metabolome and transcriptome data of two kinds of wolfberry fruits at five stages of development. Metabolome results show that amino acids, vitamins and flavonoids had the same accumulation pattern in various developmental stages of fruit but that Lycium ruthenicum accumulated more metabolites than Lycium barbarum during the same developmental stage, including L-glutamate, L-proline, L-serine, abscisic acid (ABA), sucrose, thiamine, naringenin and quercetin. Based on the metabolite and gene networks, many key genes that may be involved in the flavonoid synthesis pathway in wolfberry were identified, including PAL, C4H, 4CL, CHS, CHI, F3H, F3’H and FLS. The expression of these genes was significantly higher in Lycium ruthenicum than in Lycium barbarum, indicating that the difference in the expression of these genes was the main reason for the variation in flavonoid accumulation between Lycium barbarum and Lycium ruthenicum. Taken together, our results reveal the genetic basis of the difference in metabolomics between Lycium barbarum and Lycium ruthenicum and provide new insights into the flavonoid synthesis of wolfberry.