The 84-year-old, who has been identified only as "Mr A", was admitted to St John's Hospital in Livingston after a fall at home.
He was sent home at 6am the following day – described as a "cold, winter's morning" – but he was discovered by police less than 24 hours later wandering close to his home in a confused state and looking as if he'd been "in a traffic accident".
At this point he was admitted to a different hospital, this time outwith the Lothians, where he passed away on November 5, 2008.
The case has been investigated by the Scottish Public Services Ombudsman, who upheld the complaint against NHS Lothian, and made a series of recommendations for the health board to follow.
Mr A was already battling lung cancer when he suffered a serious fall at his West Lothian home, which caused him mouth and hip injuries.
The Ombudsman ruled he was discharged too early, and this was compounded when St John's failed to send his medical notes on to the second hospital he was taken to the day after, despite requests from staff.
While it is unclear whether or not this would have changed the fatal outcome, the organisation has been criticised for not acting more swiftly when the second hospital requested records.
NHS Lothian later told the family this may have been because the doctor involved was tired, but other staff should have carried out the task in any case.
Health chiefs also conceded, when talking to Mr A's family, that "some things had been dealt with appropriately and some had not".
The Ombudsman added: "In their response the board agreed that there had been inadequate care and treatment provided to Mr A. I have received advice that Mr A was in fact discharged without obvious management or treatment other than basic dental advice. I have been advised that normal practice in line with national guidelines was not followed."
Melanie Hornett, nurse director for NHS Lothian, said: "We have already written to the family of Mr A to apologise, but I would like to take this opportunity to publicly offer my sincere apologies for the distress caused and the shortcomings in the care provided.
"We accept the report and have implemented the recommendations in full, as described by the Ombudsman. An action list has been completed in order to prevent a repeat of this case and to ensure that lessons are learned.
"Our complaints procedure has been reviewed and the findings are being implemented as a result. Systems have also been reinforced to ensure that records are also transferred between hospitals and boards quickly and efficiently."