Attention deficit hyperactivity disorder (ADHD) is a neurodevelopmental behavioral disorder. It is common in children, can be carried over into adulthood, and is associated with inattention, hyperactivity, and impulsive behavior. Physicians typically use the patient's description and questionnaires to diagnose this disorder. Due to its subjective nature, this procedure can lead to false diagnoses, which may cause irreparable distress to the patient's life. Since mental disorders are dependent on the brain function, researchers use biological signals such as electroencephalography (EEG) to help diagnose ADHD.In this study, we propose a new feature extraction scheme based on evaluating dynamic connectivity tensors among EEG channels for constructing the input formulation of the classification model. The tensors contain correlations among the EEG channels over different time frames. This method allows preserving both temporal and spatial structures of the EEG data while reducing the input dimensions of the model. We then employ a neural network model consisting of a convolutional long short-term memory (ConvLSTM) and an attention mechanism to classify ADHD patients and the control group. This model can encode the spatiotemporal representation of EEG recordings and identify dependencies between temporal segments. Convolution is responsible for encoding and finding spatial dependencies between electrodes. LSTM explores the relationships between different time blocks, and finally, attention focuses on the most relevant parts of the sequence. We evaluate the proposed approach by performing experiments on the EEG dataset, including 400 instances with 30 s length collected from 46 children with ADHD and 45 children in the control group. We achieved an average accuracy of 99.34% on this dataset, and our best model has an accuracy of 99.75%, both are the highest among the work done in this field.