This paper suggests a weighting proposal for k nearest neighbours (kNN) classifier, which uses the Artificial Bee Colony (ABC) algorithm. The proposed approach is named as ABC-based distance-weighted kNN (dW-ABC kNN). The main idea of the hybrid algorithm is to assign random weights over sorted distances of kNN and to find the optimal weights, which achieve better classification performance. ABC algorithm carries out the weight determination operation. To evaluate the results, the data-sets from UCI machine learning repository are used. The classification performance of the dW-ABC kNN is compared with distance-weighted kNN (dW-kNN) and equally weighted kNN (eW-kNN) algorithms. The numerical simulations show that dW-ABC kNN always outperforms eW-kNN approach. It improves the correct classification performance of dW kNN in most data-sets, especially at small values of k. Experimental results confirm the merit of dW-ABC kNN approach.