TL;DR Certain studies show that caffeine can help ADHD treatment in various ways, including raising levels of dopamine (the hormone linked to pleasure, attention and movement), reducing blood flow in the brain (which calms overactivity in certain regions), and increases concentration. Caffeine can even complement certain ADHD medications. However, it's not applicable to everyone and certain precautions have to be observed when drinking caffeine in the context of ADHD.
Feeling antsy and hyperactive, being impulsive, and having short attention span are all telltale signs of Attention Deficit Hyperactivity Disorder or ADHD.
ADHD is usually thought of as a disorder in children, but people can have it even as an adult.
You might think the last thing you should take to treat it is caffeine, which is known to boost energy. But it may be just what the doctor could prescribe.
According to Healthline:
“Attention deficit hyperactivity disorder (ADHD) is a mental health disorder that can cause above-normal levels of hyperactive and impulsive behaviors. People with ADHD may also have trouble focusing their attention on a single task or sitting still for long periods of time.” 
The American Psychiatric Association adds that ADHD affects about 5 percent of children, with about half of them carrying it over into adulthood.  These numbers may even be higher in smaller communities based on estimates from Centers for Disease Control and Prevention. 
Because ADHD can affect your relationships and impact your day-to-day, it’s important to know the signs (and get help immediately): 
It may be hard to imagine how caffeine, a stimulant, can be used as a potential treatment for ADHD.
But apparently it is. And certain studies put two and two together:
Caffeine helps ADHD by increasing dopamine levels
A study cited in the journal European Neuropsychopharmacology says caffeine may normalize dopamine levels and thereby improve ADHD patients' attention. 
When you have ADHD, doctors often prescribe stimulants to help you feel calm and alert, as well as improve memory and concentration. Caffeine can help deliver these things because it increases the level of dopamine, a hormone in your body linked to pleasure, attention, and movement.
Caffeine reduces blood flow to the brain
As a vasoconstrictor that makes blood vessels narrower, caffeine reduces blood flow to the brain. This is what’s common between caffeine and amphetamine medications that treat ADHD.
According to Healthline, “reduced blood flow may help treat ADHD by reducing the activity of brain regions that are overactive, allowing them to better function and cooperate with the rest of the brain.” 
In some cases, drinking coffee is used to treat children with ADHD, like this mom who gives 7-year-old son coffee daily.
Caffeine aids in concentration
Some studies have found that caffeine can boost concentration for people with ADHD. 
To be able to concentrate on work, a person needs to have ample levels of dopamine in the brain. People with ADHD, however, are observed to have unusually lower levels of dopamine.
Caffeine as a stimulant can make a world of difference among people with ADHD as it can get their dopamine levels just right.
However, this is more applicable to adults than children and teens.
Using caffeine with ADHD medications
Mixing caffeine with amphetamine medications such as Adderall (amphetamine and dextroamphetamine) can result in synergy, a powerful combination of two drugs leading to amplified effects.
Because of synergy, caffeine makes amphetamines more effective. However, the potential side effects can also be felt strongly.
While caffeine has been considered effective as an ADHD treatment by the studies mentioned above, it’s not totally safe for everyone. The usage may depend upon a person's age, health status, and how severe their symptoms are. 
Here are the potential downsides of using caffeine to treat ADHD: 
Some people may find caffeine to be effective in helping treat ADHD, while others may find no change at all (or even worse in unfortunate cases). Because of varying results, it's best to know your body's reaction to stimulants and consult a medical professional before mixing caffeine with prescription medicine.
Unless you work outdoors or indoors in a job where you are physically active all day, it can be difficult for some people who have desk jobs to stay awake at work without caffeine.
Maybe the most important thing you can do to make sure you don’t nod off at work is to get a good night of sleep, at least 7 to 8 hours, at a regular time every night. Boredom can also cause you to nod off. Other than getting a good night’s sleep and having a fascinating job, there are things you can do to stay awake.
How do investment bankers stay awake on their 18-hour shifts?
Investment bankers work such long hours that many resort to chemical stimuli. There have been rumors of methamphetamine and cocaine use among investment bankers to burn the midnight oil. Other investment bankers take Ritalin or Adderall, which are given to children with ADHD but which are stimulants for adults. But the mainstay is probably coffee, energy drinks, and other concoctions containing caffeine.
Some law students spend 60 hours a week studying. Those who’ve been through law school advise prospective students to leave the Xbox at home so they’re not tempted with potentially ruinous distraction. How do law students get energy to study so much?
One thing many law school students do not do is party and socialize a lot. This has a doubly salutary effect because the time spent not partying is time they can spend studying. And then they are not out of sorts, hung over or over-tired the next day from partying.