Diabetes has certainly been widely known throughout the world as a serious disease. According to WHO data in 2014 there were about 422 million adults who had diabetes. This is very interesting because the increase is very visible, almost more than doubled when compared to in 1980 people with diabetes were only around 108 million people. The more sophisticated technological developments nowadays, various types of diseases can be detected computerized using the data mining method. In this study, the researcher proposes the particle swarm optimization method to improve the quality of the data to be used in the detection of diabetes using the nave Bayes method. The resulting model was tested to obtain the accuracy and AUC (Area Under Curve) of each algorithm so that it was found that testing using nave Bayes got an accuracy value of 96.15% with an AUC value of 0.991. Meanwhile, testing using the Naïve Bayes method based on attribute selection using the Particle Swarm Optimization (PSO) method, obtained an accuracy value of 97.13% with an AUC value of 0.995.