Different diagnostic systems may assign these syndromes to different categories based on theory or clinical opinion. In the DSM-IV era, OCD was listed under the "Anxiety disorders" category; however, in the DSM-5, it is now listed under a different "Obsessive-Compulsive and related disorders" category. ADHD is currently under the "Neurodevelopmental disorders" category.
However, many would argue that categorization should be based on empirical evaluation of the co-occurrence of syndromes and lower-level symptoms rather than on psychiatric theory or clinical opinion. When approached from this viewpoint, you find that OCD loads highly on the Internalizing spectrum (along with MDD, GAD, PTSD, and eating disorders) and ADHD loads highly on the Externalizing spectrum (along with substance abuse and conduct-related disorders) and moderately on the Antagonism spectrum (along with narcissism, antisocial, and histrionic disorders). There are many articles on such empirical evaluations and various dimensional and hierarchical approaches to understanding psychopathology that I could share if you are interested. One place to start is would be the Hierarchical Taxonomy of Psychopathology (HiTOP) system.