In neuroscience, neural engineering, and biomedical engineering, electroencephalography (EEG) is widely used because of its non-invasiveness, high temporal resolution, and affordability. However, noise and physiological artifacts, such as cardiac, myogenic, and ocular artifacts, frequently contaminate raw EEG data. Deep learning (DL)-based denoising techniques can reduce or eliminate these artifacts, which degrade the EEG signal. Despite these techniques, significant artifacts can still hinder the performance, making noise removal a major requirement for accurate EEG analysis. Furthermore, for strong artifact removal, an Optimized Hierarchical 1D Convolutional Neural Network (1D CNN) is introduced. For effective feature extraction, the hierarchical CNN combines max-pooling, ReLU activation, and adaptive convolutional windows. An Annealed Grasshopper Algorithm (AGA) is employed to optimize the network parameters, further improving artifact removal. To ensure comprehensive exploration and convergence toward ideal CNN settings, AGA combines the fine-tuning accuracy of Simulated Annealing (SA) with the global exploration capabilities of the Grasshopper Optimization Algorithm (GOA). By utilizing a hybrid technique, the network can more effectively eliminate artifacts from various hierarchical levels, leading to a notable improvement in signal clarity and overall accuracy. The cleaned EEG data is represented by the recovered features in the last dense layer of the Hierarchical 1D CNN, which employs a sigmoid function. Based on experimental results, the proposed method achieved a PSNR of 29.5dB, MAE of 11.32, RMSE of 0.011, and CC of 0.93, which outperforms prior works. The proposed method can improve the precision of EEG artifact removal, which is a useful addition to biomedical signal processing and neuro-engineering.