Objective To evaluate the safety study of percutaneous gastroscopic gastrostomy in patients after ventriculoperitoneal shunt. Methods We conducted a retrospective analysis of neurosurgical patients who underwent VPS and PEG at our hospital between January 2012 and November 2023. Patients were divided into 2 groups: VPS group and VPS followed by PEG gruop. Patients received routine antibiotic prophylaxis before the procedure, continued for 48 hours. Follow-up included monitoring immediate complications, particularly wound infection, intracranial infection, neurologic status deterioration, and shunt dysfunction. Routine follow-up visits were conducted post-discharge. Results In the VPS group (n = 778), the incidence of intracranial infection was 3.08%. Among patients with PEG after VPS, the time interval between procedures ranged from 13 to 685 days. The mean follow-up period was 22 (1-77) months, with no deaths or further complications. Conclusion Performing PEG more than 13 days after VPS does not significantly increase the risk of intracranial infections or PEG-associated infections, making it a relatively safe procedure.