DNA sequencing has been important since the end of Human Genome Project. However, some existing methods used to analyze DNA sequences still have limitations. Therefore, this paper proposed a novel approach considering the distance between identical bases, correlations between different bases, and base frequency features. Employing the proposed approach, a feature vector that represents DNA sequences is generated. Then the feature vector is standardized and reduced before machine learning classifiers are used for classification research. This approach has significantly improved classification accuracy. An Improved Local and Global Weighted k-nearest Neighbor Algorithm (ILGWKNN) is also introduced to address the oversight of weights in the k-nearest neighbor (k-NN) algorithm. The ILGWKNN algorithm identifies the position of the test samples in a “fuzzy region” in the training phase prior to classification. The value of k for test samples within the fuzzy region is determined by using an adaptive approach, and weighted classification is performed based on the weights of k neighbors. The ILGWKNN algorithm is superior to traditional k-NN algorithms in terms of classification accuracy.