Sweetpotato, Ipomoea batatas (L.) Lam., is an important and widely grown crop, yet its production is affected severely by biotic and abiotic stresses. The nucleotide binding site (NBS)-encoding genes have been shown to improve stress tolerance in several plant species. However, the characterization of NBS-encoding genes in sweetpotato is not well-documented to date. In this study, a comprehensive analysis of NBS-encoding genes has been conducted on this species by using bioinformatics and molecular biology methods. A total of 315 NBS-encoding genes were identified, and 260 of them contained all essential conserved domains while 55 genes were truncated. Based on domain architectures, the 260 NBS-encoding genes were grouped into 6 distinct categories. Phylogenetic analysis grouped these genes into 3 classes: TIR, CC (I), and CC (II). Chromosome location analysis revealed that the distribution of NBS-encoding genes in chromosomes was uneven, with a number ranging from 1 to 34. Multiple stress-related regulatory elements were detected in the promoters, and the NBS-encoding genes’ expression profiles under biotic and abiotic stresses were obtained. According to the bioinformatics analysis, 9 genes were selected for RT-qPCR analysis. The results revealed that IbNBS75, IbNBS219, and IbNBS256 respond to stem nematode infection; IbNBS240, IbNBS90, and IbNBS80 respond to cold stress, while IbNBS208, IbNBS71, and IbNBS159 respond to 30% PEG treatment. We hope these results will provide new insights into the evolution of NBS-encoding genes in the sweetpotato genome and contribute to the molecular breeding of sweetpotato in the future.