Fracture opening degree and inclination angle are important factors affecting the crack evolution as well as the strength of the fractured rock body. To investigate the mechanical characteristics and cracking behavior of hard rock specimens under the combined influence of opening degree and inclination angle, we conducted uniaxial compression tests and numerical simulations on pre-cracked hard rock specimens. The study shows that as the crack dip angle increases, the initial crack position of hard rock specimens with prefabricated cracks of the same opening shifts from the short-axis end to the long-axis end. Additionally, when the crack opening is less than 1.5mm, the peak strength of the sample initially decreases and then increases with the increase of the crack dip angle. The peak strength of the sample increases as the crack dip angle increases when the crack opening is greater than 1.5mm. On the other hand, when the crack opening is less than 0.4mm, the peak crack initiation stress of the specimen first decreases and then increases with the increase of the crack inclination angle. When the crack opening is greater than 0.4mm, the crack initiation stress of the specimen gradually increases with the increase of the crack inclination angle. During the compression process, the closure of the crack surface weakens the concentration of compressive stress at the end of the prefabricated crack, thereby increasing the crack initiation stress of the shear crack. For instance, in the 30° inclined specimen, the crack initiation stress of the shear crack is 156.25MPa, 100.95MPa, and 92.02MPa when the openings are 0.2mm, 0.4mm, and 2mm, respectively. Based on the stress distribution law around the detected crack, it is evident that the tensile stress concentration area shifts from the middle of the crack to both ends as the crack dip angle increases. At a dip angle greater than 45°, the concentration area is entirely at the end of the crack. The crack opening has little effect on the crack initiation stress and peak strength of the sample when the prefabricated crack angle is greater than 45°. When the prefabricated crack angle is less than 45°, the opening of the crack significantly affects the stress at which the crack initiates and the peak strength of the sample. To describe the degree of closure of prefabricated cracks at different loading stages, we propose a transition model of 'fixed beam → fixed end and hinged end'. Our study reveals the crack propagation law and mechanical mechanism of prefabricated crack specimens with a certain opening under compressive load.