Rich nations tended to perform the best - with Australia and New Zealand ranked second and third respectively.
But the report by the Economist Intelligence Unit praised progress made in some of the poorest countries.
For example Mongolia - ranked 28th - has invested in hospice facilities, while Uganda - 35th - has managed to improve access to pain control through a public-private partnership.
The rankings were worked out following assessments for the quality of the hospitals and hospice environments, staffing numbers and skills, affordability of care and quality of care.
Just 34 out of 80 countries provided what could be classed as good end-of-life care - and these accounted for just 15% of the adult population.
The report said the quality of end-of-life care was becoming increasingly important with the ageing population, meaning people were increasingly facing "drawn-out" deaths.
It`s no major surprise that richer countries, with stronger health systems, provide some of the world`s best palliative care. But a few poorer nations are bucking the trend, and it`s often down to the efforts of individuals campaigning for everyone to be allowed a dignified and pain-free death. Panama, Chile, Mongolia and Uganda are singled out for praise, whereas the situation in India and China is described as "worrying".
India ranked 67th in the index, and China was in the bottom 10 at 71. Both have huge populations and have experienced rapid economic growth, but care for people at the end of their lives has not kept up. The report warns further improvements are needed across all countries to cope with the future demands of an aging population, increasingly facing drawn-out illnesses such as cancer, heart disease and dementia.
The UK received top marks for affordability - as would be expected for a service that is provided free at the point of need - but also got a perfect score for quality of care.
Overall it was given 93.9 out of 100, but the report still said there was room for improvement - as there was with all the top-performing nations.
Services in England have recently been criticised by the Parliamentary and Health Service Ombudsman.
Report author Annie Pannelay said: "The UK is an acknowledged leader in palliative care. That reflects its comprehensive strategy towards the issue as well as the improvements that are being made.
"But there is more that the UK could do to stay at the forefront of palliative care standards, such as ironing out occasional problems with communication or symptom control."
Claire Henry, chief executive of the National Council for Palliative Care, said: "At its best how the UK cares for people who are dying is absolutely world class with hospice care leading the way, but there can be no room for complacency, especially as the demand for palliative care is increasing."
The UK also came top the last time this report was produced in 2010. Also in the top 10 this time were the Irish Republic, France, Germany and the US.
Iraq and Bangladesh finished bottom of the ranking, while China was in the worst 10.
Dr Stephen Connor, of the the Worldwide Hospice Palliative Care Alliance, said: "The biggest problem that persists is that our healthcare systems are designed to provide acute care when what we need is chronic care. That`s still the case almost everywhere in the world."
More about: