Longwall mining of the adjacent coal seam with the presence of residual coal pillars overlying the seam can result in abnormal strata pressure and severe overburden failure, which poses a significant threat to mining safety. The threat is mainly manifested in the form of intense coal or rock burst and hazardous interconnection between gobs. This study employed the universal distinct element code (UDEC) to investigate the microscopic failure mechanism of the overlying residual coal pillars under the influence of longwall mining of an adjacent underlying coal seam in Yuanbaowan coal mine, China. Using the Voronoi method, we innovatively visualized the evolution of cracks in residual pillars, revealed the mechanism behind the failure of pillars, and explored the evolution and distribution of abutment stress. Also, strata movement characteristics during underlying panel extraction have been surveyed. Based on the modeling results, effective measures are proposed to ensure safe mining under residual coal pillars. This study might provide a certain reference for safe extraction of multiple seams in Datong Coalfield, China, and also in the central and western Appalachian Basin, United States, where many mining activities are carried out under residual pillars.