The cash will be spent on converting vacant properties into "affordable" homes in Cupar in Fife; Alva in Clackmannanshire; Crieff in Perth and Kinross; Coatbridge in North Lanarkshire; Tranent in East Lothian; Carnoustie in Angus; and Kirkintilloch in East Dunbartonshire all to receive a share of the funds.
The scheme is a demonstration project that is part of the Scottish Government's town centre action plan.
Local Government Minister Derek Mackay unveiled the blueprint in November, saying it will help to bring about a "new era" for Scotland's high streets.
Local authorities, housing associations and private developers were urged to apply for a share of the funding pot.
Clackmannanshire Council receives £782,000 to help develop 17 homes in Stirling Street, Alva, and Fife Council gets £764,000 for 18 properties at Cupar's County Buildings. Angus Council gets £200,000 to develop about four homes in Carnoustie High Street, while East Dunbartonshire Council gets the same amount for six homes in Townhead, Kirkintilloch.
Some of the money is being given to housing associations. Castle Rock Edinvar Housing Association receives £350,000 to help provide seven homes in Bridge Street, Tranent, and Kingdom Housing Association gets £255,523 for 14 properties at the former Crown Hotel in Crieff. Clyde Valley Housing Association is getting £150,000 for seven homes in Bank Street, Coatbridge.
Mr Mackay said: "The Scottish Government is determined our town centres should be vibrant, attractive and safe places where local people and visitors alike want to live, work and do business in. The town centre housing fund is one of a range of measures designed to encourage and support action to improve our town centres."
The Government's action plan includes plans to extend the Fresh Start business rates relief scheme, which halves business rates for firms taking on empty property.
Ministers will also be working with council group Cosla to develop a "town centre first" policy so public bodies have to "consider" helping local high streets before thinking about developments elsewhere, while councils are to be given powers to establish town centre "investment zones".