Heart disease diagnosis is an important non-invasive technique. Therefore, there exists an effort to increase the accuracy of arrhythmia classification based on ECG signals. In this work, we present a novel approach of heart arrhythmia detection. The model consists of two parts. The first part extracts important features from raw ECG signal using Auto-Encoder Neural Network. Extracted features obtained by Auto-Encoder represent an input for the second part of the model, the Gradient Boosting and Feedforward Neural Network classifiers. For comparison purposes, we evaluated our approach by using MIT-BIH ECG database and also following recommendations of the Association for the Advancement of Medical Instrumentation (AAMI) for ECG class labeling. We divided our experiment into two scenarios. The first scenario represents the classification task for the patient-adapted paradigm and the second one was dedicated to the inter-patient paradigm. We compared the measured results to the state-of-the-art methods and it shows that our method outperforms the state-of-the art methods in the Ventricular Ectopic (VEB) class for both paradigms and Supraventricular Ectopic (SVEB) class in the inter-patient paradigm.