The research, undertaken by a group of scientists, was presented at the European Society of Cardiology conference in Munich.
Dark chocolate and cocoa intakes are already associated with a reduced risk of cardiovascular disease and cardiovascular mortality.
But no prior research had been published on the relationship between chocolate intake and heart failure, prompting the group of scientists to undertake a study investigating the association between the two.
The scientists identified five prospective studies with over 575,000 individuals and over 24,000 heart failure events.
Through the study they discovered that moderate chocolate consumption - of one to three servings of chocolate a month - was associated with a 23 per cent lower risk of heart failure than no regular chocolate intake.
This is due to flavonoids - natural compounds found in cocoa - which boost blood vessel health and help to reduce inflammation.
However, high chocolate consumption - of one or more servings of chocolate every day - was associated with a 17% higher risk of heart failure than no regular chocolate intake.
“The present study confirms the association of high chocolate consumption with the risk of heart failure. In contrast, moderate chocolate consumption may reduce the risk of heart failure,” said the study.
“I believe that chocolate is an important dietary source of flavonoids which are associated with reducing inflammation and increasing good cholesterol,” added lead researcher Dr Chayakrit Krittanawong.
“However, chocolate may have high levels of saturated fats. I would say moderate dark chocolate consumption is good for health.”
Heart failure means the heart is unable to pump blood around the body properly. It usually occurs because the heart has become too weak or stiff.
It can occur at any age, but is most common in older people.
Heart failure is a long-term condition that tends to get gradually worse over time. It can't usually be cured, but the symptoms can often be controlled for many years.
The main symptoms of heart failure are: breathlessness after activity or at rest,
feeling tired most of the time and finding exercise exhausting, and swollen ankles and legs.
Some people also experience other symptoms, such as a persistent cough, a fast heart rate, and dizziness.
Symptoms can develop quickly, known as acute heart failure, or gradually over weeks or months, known as chronic heart failure.
Conditions that can lead to heart failure include: coronary heart disease, high blood pressure, heart rhythm problems, damage or other problems with the heart valves, congenital heart disease, and cardiomyopathy - which is conditions affecting the heart muscle.
Sometimes anaemia, excessive alcohol consumption, an overactive thyroid, or high pressure in the lungs can also lead to heart failure.
“It is important to remember is that, regardless of any potential benefits, chocolate is high in fat and calories and should be enjoyed only in moderation,” the NHS said.
“A diet high in fat and calories is known to increase the risk of obesity, heart disease and stroke, rather than decreasing it.”