TnpBs encoded by the IS200/IS605 family transposon are among the most abundant prokaryotic proteins from which type V CRISPR-Cas nucleases may have evolved. Since bacterial TnpBs can be programmed for RNA-guided dsDNA cleavage in the presence of a transposon-adjacent motif (TAM), these nucleases hold immense promise for genome editing. However, the activity and targeting specificity of TnpB in homology-directed gene editing remain unknown. Here we report that a thermophilic archaeal TnpB enables efficient gene editing in the natural host. Interestingly, the TnpB has different TAM requirements for eliciting cell death and for facilitating gene editing. By systematically characterizing TAM variants, we reveal that the TnpB recognizes a broad range of TAM sequences for gene editing including those that do not elicit apparent cell death. Importantly, TnpB shows a very high targeting specificity on targets flanked by a weak TAM. Taking advantage of this feature, we successfully leverage TnpB for efficient single-nucleotide editing with templated repair. The use of different weak TAM sequences not only facilitates more flexible gene editing with increased cell survival, but also greatly expands targeting scopes, and this strategy is probably applicable to diverse CRISPR-Cas systems.