Background. Fear of hypoglycemia can result in anxiety, stress, anger, depression and severe avoidance behaviors that it affects the sleep quality of diabetic patients. Therefore, the present study was conducted with the aim of investigating the relationship between fear of hypoglycemia and sleep quality among type 2 diabetic patients. Methods. The present cross-sectional study was conducted on 400 type 2 diabetic patients referred to endocrinology clinic of Velayat Hospital and Boali Hospital in Qazvin, in 2019. Data were collected using a checklist for demographic variables, the Fear of Hypoglycemia Survey (FHS-W), and the Pittsburgh sleep quality index (PSQI). Descriptive statistics and Spearman correlation test were performed for data analysis using SPSS v24. Results. In this study, the mean age of diabetic patients was 55.75 ± 10.31. The majority of the participants were female (n = 299, 74.8%) and were treated with oral anti-diabetic drugs (n = 174, 43.5%). The mean score of sleep quality in patients was 8.98 ± 3.64 and the fear of hypoglycemia was 21.27 ± 11.92. The results of this study showed that there was a significant relationship between the fear of hypoglycemia and the poor sleep quality among patients (P < 0.001, r = 0.305). Conclusion. The fear of hypoglycemia has a direct and significant relationship with poor sleep quality in diabetic patients; so that this fear reduces the quality of sleep in diabetic patients. Therefore, in order to provide adequate sleep to prevent inappropriate sleep complications, great attention should be paid to the issue of fear of hypoglycemia, and consider some actions to reduce this fear.