They were also more likely to have poor attention spans and show disruptive behavior such as ADHD (attention deficit hyperactivity disorder).
It is thought that a component in licorice called glycyrrhizin may impair the placenta, allowing stress hormones to cross from the mother to the baby.
High levels of such hormones, known as glucocorticoids, are thought to affect fetal brain development and have been linked to behavioral disorders in children.
The results of the study are published in the American Journal of Epidemiology. Eight-year-olds whose mothers had been monitored for licorice consumption during pregnancy were tested on a range of cognitive functions including vocabulary, memory and spatial awareness.
Behavior was assessed using an in-depth questionnaire completed by the mother, which is also used by clinicians to evaluate children's behavior.
The study, carried out by the University of Helsinki and the University of Edinburgh, looked at children born in Finland, where consumption of licorice among young women is common.
Professor Jonathan Seckl, from the University of Edinburgh's Centre for Cardiovascular Science, said: "This shows that eating licorice during pregnancy may affect a child's behavior or IQ and suggests the importance of the placenta in preventing stress hormones that may affect cognitive development getting through to the baby."
Women who ate more than 500mg of glycyrrhizin per week – found in the equivalent of 100g of pure licorice – were more likely to have children with lower intelligence levels and more behavioral problems.
"Expectant mothers should avoid eating excessive amounts of licorice," said Professor Katri Räikkönen, from the University of Helsinki's Department of Psychology.
Of the children who took part in the study, 64 were exposed to high levels of glycyrrhizin in licorice, 46 to moderate levels and 211 to low levels.
The research followed on from a study which showed that licorice consumption was also linked to shorter pregnancies. Laboratory studies have also shown a link between the placenta not working to prevent stress hormones from passing through to the fetus, as well as a link to cardiac and metabolic disorders and behavioral problems in later life.