We consider the problem of improving outcomes for neurosurgery patients by enhancing intraoperative navigation and guidance. Currently intraoperative navigation systems do not accurately account for brain shift or for tissue resection. In this paper, we describe how preoperative images are incrementally updated to take into account any type of brain tissue deformation that can occur during surgery, and thus to improve the accuracy of image-guided navigation systems. For this purpose, we develop a nonrigid image registration technique using on a biomechanical model, which deforms based on the Finite Element Method (FEM). While FEM has been successfully used for dealing with deformation such as brain shift, FEM has difficulties dealing with tissue discontinuities. Here, we describe the novel application of the eXtended Finite Element Method (XFEM) in the field of image-guided surgery, in order to model brain deformations that imply tissue discontinuities. In particular, this paper presents a detailed account of the use of XFEM for dealing with retraction and successive resections, and demonstrates the feasibility of the approach by considering 2D examples based on intraoperative MR images. For evaluating our results, we compute the modified Hausdorff distance between Canny edges extracted from images before and after registration. We show that this distance decreases after registration, and thus demonstrate that our approach improves alignment of intraoperative images.