Varicella-zoster virus (VZV) infections result in a series of ophthalmic complications. Clinically, we also discover that the proportion of dry eye symptoms was significantly higher in patients with herpes zoster ophthalmicus (HZO) than in healthy individuals. Meibomian gland dysfunction (MGD) is one of the main reasons for dry eye. Therefore, we hypothesize that HZO may associate with MGD, affecting the morphology of meibomian gland (MG) because of immune response and inflammation. The purpose of this study is to retrospectively analyze the effect of HZO with craniofacial herpes zoster on dry eye and MG morphology based on an Artificial intelligence (AI) MG morphology analytic system. In this study, 26 patients were diagnosed as HZO based on a history of craniofacial herpes zoster accompanied by abnormal ocular signs. We found that the average height of all MGs of the upper eyelid and both eyelids were significantly lower in the research group than in the normal control group (p < 0.05 for all). The average width and tortuosity of all MGs for both upper and lower eyelids were not significantly different between the two groups. The MG density of the upper eyelid and both eyelids were significantly lower in the HZO group than in the normal control group (p = 0.020 and p = 0.022). Therefore, HZO may lead to dry eye, coupled with the morphological changes of MGs, mainly including a reduction in MG density and height. Moreover, it is important to control HZO early and timely, which could prevent potential long-term severe ocular surface injury.