A three-dimensional (3D) simulation of bioheat transfer is crucial to analyze the physiological processes and evaluate many therapeutic/diagnostic practices spanning from high to low temperature medicine. In this paper we develop an efficient numerical scheme for solving 3D transient bioheat transfer equations based on the alternating direction implicit finite-difference method (ADI-FDM). An algorithm is proposed to deal with the boundary condition for irregular domain which could capture accurately the complex boundary and reduce considerably the staircase effects. Furthermore, the local adaptive mesh technology is introduced to improve the computational accuracy for irregular boundary and the domains with large temperature gradient. The detailed modification to ADI-FDM is given to accommodate such special grid structure, in particular. Combination of adaptive-mesh technology and ADI-FDM could significantly improve the computational accuracy and decrease the computational cost. Extensive results of numerical experiments demonstrate that the algorithm developed in the current work is very effective to predict the temperature distribution during hyperthermia and cryosurgery. This work may play an important role in developing a computational planning tool for hyperthermia and cryosurgery in the near future.