With the gradual increase of coal mining intensity, many coal pillars need to be left near the stope. The stability of the composite structure of coal pillars and their overlying strata determines the safety of the whole stope and the surface. This paper conducts uniaxial compression tests on coal-rock composite structures with the same lithology and the same coal-rock height ratio and finds the coal-rock composite structure’s mechanical properties and failure characteristics have greater discreteness. Combining the CT images of rock and coal, it is concluded that the main reason for the discreteness of the composite structure test results is the different crack characteristics in the rock specimen and the coal specimen. Therefore, this paper uses the PFC numerical simulation software to analyzes the influence of the crack characteristics on the mechanical properties, failure characteristics, and impact energy index of the coal-rock composite structure. The sensitivity factors are used to analyze the influence of crack angle, crack length, crack number and crack position on the peak stress, total crack number, and impact energy index of the coal-rock composite structure. The research results can provide a theoretical basis and guidance for preventing the instability and failure of the coal pillar-roof composite structure.