To assess the effect of percutaneous endoscopic gastrostomy on short- and long-term survival of patients in a persistent vegetative state after stroke and determine the relevant prognostic factors. Stroke may lead to a persistent vegetative state, and the effect of percutaneous endoscopic gastrostomy on survival of stroke patients in a persistent vegetative state remains unclear. Prospective study. A total of 97 stroke patients in a persistent vegetative state hospitalised from January 2009 to December 2011 at the Second Hospital, University of South China, were assessed in this study. Percutaneous endoscopic gastrostomy was performed in 55 patients, and mean follow-up time was 18months. Survival rate and risk factors were analysed. Median survival in the 55 percutaneous endoscopic gastrostomy-treated patients was 17·6months, higher compared with 8·2months obtained for the remaining 42 patients without percutaneous endoscopic gastrostomy treatment. Univariate analyses revealed that age, hospitalisation time, percutaneous endoscopic gastrostomy treatment status, family financial situation, family care, pulmonary infection and nutrition were significantly associated with survival. Multivariate analysis indicated that older age, no gastrostomy, poor family care, pulmonary infection and poor nutritional status were independent risk factors affecting survival. Indeed, percutaneous endoscopic gastrostomy significantly improved the nutritional status and decreased pulmonary infection rate in patients with persistent vegetative state after stroke. Interestingly, median survival time was 20·3months in patients with no or one independent risk factors of poor prognosis (n=38), longer compared with 8·7months found for patients with two or more independent risk factors (n=59). Percutaneous endoscopic gastrostomy significantly improves long-term survival of stroke patients in a persistent vegetative state and is associated with improved nutritional status and decreased pulmonary infection. Percutaneous endoscopic gastrostomy is a promising option for the management of stroke patients in a persistent vegetative state.