The British Medical Journal study looked at 10 million people, aged 77 on average, who took the drugs.
UK experts said the findings had little relevance for most under-65s but were a possible concern for elderly patients.
The study analysed data for the 10 million users - who were from the UK, the Netherlands, Italy and Germany - and compared them with people who did not take the drugs.
The researchers, from University of Milano-Bicocca in Italy, found taking NSAIDs increased the risk of being taken to hospital with heart failure by 19%.
Since most people in the study were older - and those on NSAIDs were, in general, in poorer health - UK experts said the findings had very little relevance for most under-65s but may be a concern for elderly patients.
`Use with caution`
The British Heart Foundation (BHF) said patients should be on the lowest dose possible of NSAIDs for the shortest possible time.
Prof Peter Weissberg, medical director at the BHF, said: "This large observational study reinforces previous research showing that some NSAIDs, a group of drugs commonly taken by patients with joint problems, increase the risk of developing heart failure.
"It has been known for some years now that such drugs need to be used with caution in patients with, or at high risk of, heart disease.
"This applies mostly to those who take them on a daily basis rather than only occasionally.
"Since heart and joint problems often coexist, particularly in the elderly, this study serves as a reminder to doctors to consider carefully how they prescribe NSAIDs, and to patients that they should only take the lowest effective dose for the shortest possible time.
"They should discuss their treatment with their GP if they have any concerns."
Younger patients
Helen Williams, consultant pharmacist for cardiovascular disease at the Royal Pharmaceutical Society, told BBC Radio 4`s Today programme that the focus needed to be on older patients with conditions or diseases that might put them at increased risk of heart failure anyway.
"Hypertension, diabetes, maybe kidney problems - it`s in those patients when we add these drugs on top that there might be a small increase in their risk," she said.
Stephen Evans, professor of pharmacoepidemiology at the London School of Hygiene and Tropical Medicine, said: "The consequence is that it is of very little relevance to most people below age 65 taking painkillers, but in the very elderly, say, above 80, that the effects are of more relevance."
Ms Williams said that younger patients who took short courses of ibuprofen, for example, should not be worried. However, she did warn against young people taking the drugs regularly.
"If you take a very occasional course - it`s like most people will do for aches and pains, sports injuries etcetera - then there`s no need to worry."
But she added: "I think I would say if you`re a young person who is regularly going to buy these drugs, and effectively taking them all the time, you probably should be supervised by a clinician because there are other issues with these drugs and we might want to keep an eye, for example, on your kidneys."
Ms Williams also said it was important to use over-the-counter painkillers for the right reasons.
She said: "Ibuprofen are anti-inflammatory drugs so if you`ve damaged your muscles where there`s likely to be inflammation, then ibuprofen might be appropriate.
"If you`ve got a headache, it`s unlikely that there`s going to be an inflammation issue and paracetamol is fine."
More about: