Ultrasonic imaging with phased array has been widely employed for nondestructive testing in various fields. Phase shift migration (PSM) is a significant imaging method and shows great advantages for multilayer structures. However, the artifact reflections at the edges of the calculation region emerge in the wavefield reconstruction process, which greatly deteriorate the imaging quality of PSM. To overcome this problem, two absorbing boundary conditions for the wavefield extrapolation of PSM are proposed in this paper. The first absorbing boundary condition renders elements in the boundary regions lower weights in frequency-space domain. The second one follows a nonstationary phase shift scheme and filters the incident waves in the boundary regions in frequency-wavenumber domain. The implementing schemes of the absorbing boundary conditions for both homogenous and heterogenous medium are developed, and the full-matrix imaging method with absorbing boundary conditions is proposed. According to the simulation and experiment, the proposed boundary conditions have strong ability to suppress the background artifacts, and they can improve the signal-to-noise ratio (SNR) and resolution by 2 times when imaging heterogenous medium. Further experiments indicate that the boundary conditions are insensitive to the window functions, and a width of one-sixteenth the length of the scan line is recommended for the absorbing boundary conditions.