Chronic atrophic gastritis (CAG) is a common and possibly precancerous digestive tract disease. Development of drugs with effect of preventing precancerous lesions draws the eyes of global researchers. Qilianshupi decoction (QLSP) is a Traditional Chinese Medicine (TCM) that is commonly used to treat CAG, but few studies have explored the mechanism of QLSP on treating CAG. This study investigated the molecular targets of the component herbs of QLSP in preventing precancerous lesions based on network pharmacology. Network pharmacology analysis revealed that the 6 herbs regulated multiple CAG-related genes, among which the most important were cancer-related pathway (apoptosis, p53, and VEGF) and epithelial cell signaling in Helicobacter pylori infection. Further animal experiments showed that the expression of survivin and p53 in precancerous lesions of CAG rats was significantly increased which was suppressed by QLSP. Moreover, telomerase activity was inhibited in precancerous lesions of CAG rats, and telomere length of gastric mucosa was increased, which was reversed by QLSP. Our results suggest that the components of QLSP prevents gastric precancerous lesions through decreasing the expression of survivin and p53 and regulating telomerase activity and telomere length in CAG.