A growing number of smart wearable biosensors are operating in the medical IoT environment and those that capture physiological signals have received special attention. Electrocardiogram (ECG) is one of the physiological signals used in the cardiovascular and medical fields that has encouraged researchers to discover new non-invasive methods to diagnose hyperglycemia as a personal variable. Over the years, researchers have proposed different techniques to detect hyperglycemia using ECG. In this paper, we propose a novel deep learning architecture that can identify hyperglycemia using heartbeats from ECG signals. In addition, we introduce a new fiducial feature extraction technique that improves the performance of the deep learning classifier. We evaluate the proposed method with ECG data from 1119 different subjects to assess the efficiency of hyperglycemia detection of the proposed work. The result indicates that the proposed algorithm is effective in detecting hyperglycemia with a 94.53% area under the curve (AUC), 87.57% sensitivity, and 85.04% specificity. That performance represents an relative improvement of 53% versus the best model found in the literature. The high sensitivity and specificity achieved by the 10-layer deep neural network proposed in this work provide an excellent indication that ECG possesses intrinsic information that can indicate the level of blood glucose concentration.