The money aims to develop intermediate care - helping people stay in their home instead of going into hospital - as well as supporting patients to regain their independence and return home sooner after a hospital stay.
The cash will go the Forth Valley, Greater Glasgow and Clyde, Lanarkshire, Lothian, Fife, Grampian and Highland health board areas.
It is hoped the money will allow patients to be moved from accident and emergency to an appropriate ward sooner and reduce the amount of unnecessary time spent in hospital.
Scottish Health Secretary Alex Neil said: "Our NHS and its partners are making sustainable progress around exploring innovative ways to improve the way patients move through our health and care services.
"We have already legislated for health and social care integration to come into effect from next April but we must make further progress now.
"This £5m will go to support the transition to integrated health and social care.
"It will help many patients leave hospital as soon as they are able and return to their home, supported by appropriate care services.
"This benefits the individual patient and also helps improve the performance in frontline services, such as A&E and planned operations."