At least 40 patients died between March 2015 and September 2016, while stuck in hospital in Tayside and Fife.
Delayed discharges have been a long-running problem at NHS Scotland. Nationally, nearly 700 patients have died while on delayed discharge lists in the 18-month period.
Anas Sarwar, health spokesman for Scottish Labour, which obtained the data, said: “These are horrifying figures. Almost every health board has seen a delayed discharge death.
“This shows that delayed discharges are not just detrimental to patient flow and the running of our hospitals but that they can be seriously dangerous for the patients involved.”
A delayed discharge occurs when an inpatient is medically fit to leave hospital but continues to occupy a bed after their release date.
It is often associated with a lack of capacity in community services, such as care homes.
Health Secretary Shona Robison said she aimed to “eradicate” delayed discharge within a year.
The Scottish Government is trying to alleviate those pressures through the integration of health and social care services.
Ms Robison said they are helping health boards prepare for winter challenges with £3 million on top of the £30m a year allocated to help tackle delayed discharges.
A spokesman for Fife’s Health and Social Care Partnership said patients are not dying because of discharge delays. Many had life-limiting illnesses and their condition deteriorated while their discharge was delayed, which meant they could not return home.
“Patients experiencing a delay in their discharge are most often frail and have complex medical and care needs,” he said.