Dennis Parker, 27, was stabbed through the heart by two men in what is believed to be a row over drug debts.
Mr Parker, from Eskside West in Musselburgh, was in his flat with another man when attacked.
Mr Parker's friend was also injured but stumbled outside to call for help shortly after 1am on Saturday morning.
Both were taken to Edinburgh Royal Infirmary, where Mr Parker died.
His friend – known locally as "Chalky" – suffered serious injuries that are not believed to be life-threatening.
While police hunted for the attackers, friends of Mr Parker said that drugs were to blame.
A friend, who did not wish to be named, said: "Wee Dennis had plenty of enemies – what we're hearing is that this is over a debt or a bad deal.
"Dennis wouldn't hurt anybody so he certainly didn't deserve to be murdered.
"It's all because of drugs and now he's gone."
The friend added: "He was well known in Musselburgh because he'd been here all his life. It's a terrible way to go – I'd heard he'd been stabbed through the heart."
Postman Alec Coburn, 45, said: "It's very disturbing. It is quite quiet around here and this has come as a shock."
Lothian and Borders Police are appealing to the public for information that could track down the attackers.
Forensics officers were seen combing the scene for clues on Saturday after sealing off the street, which overlooks the River Esk.
A police spokesman said: "Two suspects wearing balaclavas attacked the victims in this brutal incident."