Since the last decade, the Electrocardiogram (ECG) tool has received medical experts and researchers' attention for accurate and fast diagnosis of cardiovascular diseases (CVD). The automatic detection and classification of 1D ECG-based heart disease have become more realistic and efficient solutions using the deep learning technique such as Convolutional Neural Network (CNN). As CNN is designed mainly for 2D or 3D applications therefore, designing CNN to process 1D ECG becomes challenging. We proposed a novel framework for automatic CVD detection and classification from the raw ECG signals using 1D-CNN deep learning technique. The framework consists of pre-processing, automatic feature extraction, feature optimization, and classification. In pre-processing, raw ECG signals are filtered to remove the baseline drift and power line interference using median and notch filters respectively. The pre-processed ECG signals are then used to extract the QRS and ST waves using the dynamic thresholding in the wavelet transfer domain. The fusion of QRS and ST waves have fed to automatic 1D-CNN that consists of layers i.e,1D convolutional layer, ReLU layer, and max-pooling layers. The 1D-CNN is proposed in this paper to extract features automatically with little computing complexity. The high-dimensional raw CNN features are optimized by applying a feature selection and scaling approach. For classification, different soft computing techniques such as Long- Short Term Memory (LSTM), Support Vector Machine (SVM), Naïve Bays (NB), Artificial Neural Network (ANN), and k-nearest neighbor (KNN) are applied. The experimental performances of the proposed model have been investigated on a publicly available research dataset and outperformed recent CNN-based techniques.