Lycium barbarum, a member of the Solanaceae family, represents an important eudicot lineage with homology of food and medicine. Lycium barbarum pectin polysaccharides (LBPPs) are key bioactive ingredients of Lycium barbarum, and are among the few polysaccharides with both biocompatibility and biomedical activity. While previous studies have primarily focused on the functional properties of LBPPs, the mechanisms of biosynthesis and transport by key enzymes remain poorly understood. Here, we reported the completion of a 2.18-gigabase reference genome of Lycium barbarum, reconstructed the first entire biosynthesis of pectin polysaccharides and sugar transport, and characterized the important genes responsible for backbone extending, sidechain synthesis, and modification of pectin polysaccharides. Additionally, we characterized long non-coding RNAs (lncRNAs) associated with polysaccharide metabolism and identified a specific rhamnogalacturonan I (RG-I) rhamnosyltransferase, RRT3020, which enhances RG-I biosynthesis in LBPPs. These newly identified enzymes and pivotal genes endow L. barbarum with specific pectin biosynthesis capabilities, distinguishing it from other Solanaceae species. Our findings provide a foundation for evolutionary studies and molecular breeding to enhance the diverse applications of L. barbarum.