Pharmacologic treatment in children and adolescents with psychiatric disorders reduces the risk of substance use later in life, especially in ADHD. Earlier-onset and longer-lasting treatment were most effective at reducing the later onset of substance use disorders.