Varicella-zoster virus infection can cause two different diseases: chickenpox and shingles. Neurological complications, including postherpetic neuralgia and stroke, can occur after the onset of herpes zoster patients. Currently, there are few studies assessing the risk of stroke after the onset of shingles, and the impact of vaccination against shingles on the risk of stroke is unclear. The study aimed to explore the risk of stroke in patients with shingles after onset and to evaluate the impact of shingles vaccination on this risk. A case-control study using national case data from January 2010 to January 2020 from the United States Department of Veterans Affairs database included 2 165 505 patients aged 18 years and older, including 71 911 patients with a history of herpes zoster. The results showed that patients with herpes zoster had an increased risk of stroke within 30 days of onset,ORValues (95%CI) is 1.93 (1.57-2.40),P<0.001; Reduced risk of stroke after vaccination with recombinant shingles vaccine or live shingles vaccine,ORValues (95%CI) were 0.57 (0.46~0.72) and 0.77 (0.65~0.91), bothP<0.001。