Crosshole resistivity tomography was performed to image the subsurface structures and mine cavities beneath a 25 story apartment building constructed at an abandoned mining site, and to provide the underground model for the safety analysis of the building. Strong electrical anisotropy was observed in the measured data, which has proven to be mainly due to geology. In order to deal with the anisotropy effect and to reconstruct the subsurface images reflecting the underground status precisely, we developed anisotropy inversion codes for resistivity tomography. The algorithm is based on finite element approximations for the forward modeling; the ACB (Active Constraint Balancing) method was adopted in the program in order to enhance the resolving power of the smoothness constraint least-squares inversion. All the acquired data were inverted by the developed inversion code so as to reconstruct the subsurface images, which match quite well with the geological mapping result. In particular, the locations of cavities were delineated more precisely owing to the anisotropic characteristics of the basement rock. Based on the subsurface model established by the resistivity tomography, rock engineering numerical analysis was further carried out. The result obtained from this analysis showed that the high-storied building is safe, even though three abandoned tunnels of the old mine are located beneath the building.