Electroencephalography (EEG) signal finds extensive use in various medical diagnoses and non-invasive brain computer interface (BCI) applications. These applications include assisting individuals with disabilities, operating devices, and facilitating communication with their environments. Recent EEG studies have achieved successful decoding of neural activity using only time series data, surpassing the classification accuracy achieved by human experts. However, the decoding models are susceptible to adversarial examples that remain imperceptible to human evaluation. Thus, there is a current lack of a versatile architecture capable of simultaneously detecting adversarial examples and classifying EEG data. In this paper, we explore a hierarchical neural network-based classifier and introduce an adversarial training approach to enable the first classifier to learn from both clean and adversarial EEG data, enhancing its resilience to adversarial attacks. Subsequently, clean data have fed to EEGNET model to classify each EEG data point into its respective class. In the evaluation phase, we focused on the robustness of this approach against Fast Gradient Sign Method (FGSM) adversarial attacks using the BCI Competition IV-2a dataset, We assessed this approach and achieved an accuracy of 99.92% and a Kappa score of 0.9985.