When applied to thermoacoustic imaging (TAI), the delay-and-sum (DAS) algorithm produces strong sidelobes due to its disadvantages of uniform aperture weighting. As a result, the quality of TAI images recovered by DAS is often severely degraded by strong non-coherent clutter, which restricts the development and application of TAI. To address this issue, we propose an adaptive complementary neighboring sub-aperture (NSA) beamforming algorithm for TAI. In NSA, we introduce a coordinate system transformation when calculating the normalized cross-correlation (NCC) matrix. This approach enables the computation of the NCC coefficient within the specified kernel without complex coordinate calculations. We first conducted the numerical simulation experiment to validate NSA using a tree branch phantom. In addition, we also conducted phantom (five sauce tubes), ex vivo (ablation needle in ex vivo porcine liver), and in vivo (human arm) TAI experiments using our TAI system with a center frequency of 3GHz. In the numerical simulation experiment, the structural similarity index (SSIM) value for NSA is increased from 0.37828 for DAS to 0.75492. In the point target phantom TAI experiment, the generalized contrast-to-noise ratio (gCNR) value for NSA is increased from 0.936 for DAS to 0.962. The experimental results show that NSA can recover clearer thermoacoustic images compared to DAS. In the ex vivo TAI experiment, the full width at half maxima (FWHM) of an ablation needle (diameter=1.5mm) for coherence factor (CF) weighted DAS and NSA are 0.9 and 1.3mm, respectively. Furthermore, in the in vivo TAI experiment, CF reduces the signals within the arm compared to NSA. Therefore, compared with CF, NSA can maintain the integrity of target information in TAI while effectively suppressing non-coherent background clutter. NSA can effectively reduce non-coherent background noise while ensuring the completeness of the target information. So, NSA offers the potential to provide high-quality thermoacoustic images and further advance their clinical application.