Whilst Ashwagandha and Ginseng do have some similarities in terms of their uses, both have shown promise in stress reduction and sleep, there are some differences.
There is also some issue with the specific type of ginseng, for the sake of this article we will be largely discussing Panax Ginseng, which does have more uses in general. Particularly in the hormonal area, which is another parallel to Ashwagandha. As both herbs have been shown to raise testosterone levels in men and balance hormones in women.
As a quick round up, Ashwagandha is generally considered better for sleep, testosterone production and stress. Ginseng whilst still useful for these things, has more studies to suggest it improves sexual function, energy levels and supporting the immune system.
It's also worth noting that there aren't many direct comparison trials between Ashwagandha and Ginseng, and those that have been done are on animals  however, they did show Ashwagandha to be slighlty better for producing lean muscle mass. although ginseng was also effective. Note that this was once again Panax Ginseng, not American Ginseng which does not have the same properties for testosterone, or lean muscle mass.
It is also worth noting that Ashwagandha and Ginseng are often combined together in herbal supplements and they do seem to work well together based on anecdotal evidence.
Stress - One of the primary reasons ashwagandha has gained popularity is its classification as an adaptogen. Adaptogens are substances that help the body adapt to stressors, whether physical, mental, or emotional. Ashwagandha has been traditionally used to support the body's stress response and promote overall well-being. Several studies have shown that Ashwagandha can reduce stress by reducing cortisol (the stress hormone) build up. 
Anxiety - Anxiety is a common mental health concern that can significantly impact daily life. Several studies have investigated the potential anxiolytic effects of ashwagandha. Research suggests that ashwagandha may help reduce anxiety symptoms by modulating neurotransmitters and supporting the body's stress response. 
Sleep - There’s quite a lot of research that indicates that ashwagandha may improve sleep quality by balancing neurotransmitters involved in sleep regulation. Most of the studies dose ashwagandha at 300mg for sleep and seem to show positive results. 
Testosterone - Some studies suggest that ashwagandha may have a positive impact on testosterone levels in men. Generally speaking this in in doses of 600mg, and overall the studies are relatively high quality. In this regard it seems to be more effective than Panax Ginseng overall, although Ginseng has other benefits to male health beyond its effect on testosterone production. 
Cognitive Function Enhancement - Ginseng has long been revered for its potential to enhance cognitive function. Research suggests that ginseng may improve memory, attention, and mental performance. It is believed to achieve these cognitive benefits by promoting blood flow to the brain, reducing oxidative stress, and modulating neurotransmitters. 
Blood Sugar Regulation - Maintaining healthy blood sugar levels is crucial for overall health, particularly for individuals with diabetes or prediabetes. Ginseng has been studied for its potential blood sugar-regulating effects. Some research suggests that ginseng may improve insulin sensitivity, lower fasting blood sugar levels, and enhance glycemic control. 
Antimicrobial Properties - Ginseng has exhibited antimicrobial properties against various bacteria and viruses in laboratory studies. These antimicrobial effects may be attributed to the bioactive compounds present in ginseng, such as ginsenosides. However, further research is needed to determine the clinical implications of these findings. 
Improving Sexual Function - Panax ginseng has been traditionally used as an aphrodisiac and to improve sexual function. Some studies suggest that it may help enhance libido, improve erectile function, and reduce symptoms of sexual dysfunction. 
Testosterone - There is limited research, although it is positive, on the direct effects of ginseng on testosterone levels. Although more research is needed to confirm these findings. 
Sleep - Ginseng has also been shown to improve sleep quality  and help people stay asleep for longer, however, unlike Ashwagandha there is less evidence to suggest it can support time to fall asleep.
Ashwagandha vs Ginseng Side Effects
Ashwagandha is generally regarded as safe when consumed in appropriate doses. However, some individuals may experience mild side effects, including digestive discomfort, drowsiness, or allergic reactions. Additionally, ashwagandha may interact with certain medications, such as sedatives, immunosuppressants, and thyroid medications. It should be noted however, that digestive issues are more common with Ashwagandha than ginseng.
Ginseng is considered safe for most people when used as directed. However, high doses or prolonged use may lead to side effects such as insomnia, headaches, and digestive issues. Ginseng may also interact with certain medications, including blood thinners, diabetes medications, and stimulants.
1 - https://pubmed.ncbi.nlm.nih.gov/7898119/
2 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3252722/
3 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3573577/
4 - https://pubmed.ncbi.nlm.nih.gov/32818573/
5 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6438434/
6 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6173364/
7 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6943541/
8 - https://pubmed.ncbi.nlm.nih.gov/26559705/
9 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3861174/
10 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7352699
11 - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3659601/