Neurofeedback (NF) has gained increasing popularity as a training method for children and adults with attention deficit hyperactivity disorder (ADHD). However, it is unclear to what extent children learn to regulate their brain activity and in what way NF learning may be affected by subject- and treatment-related factors. Methods. In total, 48 subjects with ADHD (age 8.5–16.5 years; 16 subjects on methylphenidate (MPH)) underwent 15 double training sessions of NF in either a clinical or a school setting. Four mixed-effects models were employed to analyze learning: training within-sessions, across-sessions, with continuous feedback, and with transfer in which performance feedback is delayed. Results. Age and MPH affected the NF performance in all models. Cross-session learning in the feedback condition was mainly moderated by age and MPH, whereas NF learning in the transfer condition was mainly boosted by MPH. Apart from IQ and task types, other subject-related or treatment-related effects were unrelated to NF learning. Conclusion. This first study analyzing moderators of NF learning in ADHD with a mixed-effects modeling approach shows that NF performance is moderated differentially by effects of age and MPH depending on the training task and time window. Future studies may benefit from using this approach to analyze NF learning and NF specificity. The trial name Neurofeedback and Computerized Cognitive Training in Different Settings for Children and Adolescents With ADHD is registered with NCT02358941(https://clinicaltrials.gov/ct2/show/NCT02358941).