This paper is mainly aimed to present an improved DDA (discontinuous deformation analysis) that can deal well with both shear and tensile failure problems. Firstly, the shear mechanism of DDA is detailed investigated. The results show that when handling the frictional interface, the critical shear resistance can be accurately determined only if the penalty value is carefully selected, however, when handling the cohesive interface, the critical shear resistance is significantly underestimated. The inaccurate prediction is due to the inconsistent distribution of normal force and shear force between the two vertex-to-edge contacts in one edge-to-edge contact. Here an edge-to-edge treatment is introduced into DDA. Secondly, to moderately reflect the tensile failure process of rock masses, a two-phase constitutive model is introduced into the DDA with edge-to-edge treatment, and the improved DDA is obtained. Finally, the improved DDA is used to simulate the failure process of gypsum centrifuge model. The results show the improved DDA can deal well with rock failure problems by shear or tension failure.