Rock failure analysis is an important research in investigating the behavior of rocks, especially its failure process. And a rock sample, which contains pre-existing cracks, is a typical sample to investigate the rock failure behavior which under tension or compression, because almost all the natural materials exist micro-flaws more or less. This mode is closed to the natural material character. By using Rock Failure Process Analysis code, RFPA2D, we present a numerical simulation and similar materials experiment on rock samples with two pre-existing cracks in uniaxial compression were conducted to investigate the initiation, propagation, coalescence of cracks and failure mechanism of rock. Numerical simulations visually reproduce the process of crack initiation, propagation and coalescence in rock, which are well tallied with experiments in laboratory.