Dennis Parker, 27, from Eskside West, Musselburgh, was knifed in the heart in the early hours of Saturday morning after the masked men burst into his flat. His friend, 21, believed to be known locally as "Chalky", was also badly injured in the attack.
It is believed that the row broke out due to a drug debt.
Mr Parker's friend is thought to have stumbled outside to a nearby phone box to call for help shortly after 1am on Saturday.
Both men were rushed to Edinburgh Royal Infirmary for emergency treatment, but Mr Parker, who lived in Musselburgh all his life, later died from his injuries.
Police have now launched a full-scale murder investigation.
About 25 police officers, forensics and CID scoured the area for evidence yesterday afternoon. Police officers searched nearby grassy areas, bins and back gardens, and nearby residents were questioned.
The block of flats was cordoned off by forensic workers, as were a number of bins and areas around the back of the building. A phone box was also sealed off.
One neighbouring flat owner, who did not want to be named, said the stabbing had been a "huge shock" for local residents. He said: "I've lived here for 18 years and nothing like this has ever happened. The lad seemed like an all right bloke. We've said 'hello' to each other a couple of times. Mostly he kept himself to himself, though.
"We do get a bit of noise and a few fights around here because this is one of the main routes back from the local pubs, but I've never seen anything like this. The worst thing that's happened has been vandalism to cars.
"It is a huge shock, but we all want to get on with our lives now."
Another neighbour added: "We've heard he was killed because of a drug debt. A lot of people would hang out at his house and it is quite well known that there has been trouble there in the past.
"Our daughter lives next to a guy who was his mate, and he said he had stopped hanging out with Dennis because he'd got into a rough gang. It's a shame this happened."
A friend of Mr Parker's 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."
Lothian and Borders Police are appealing to the public for information that could track down the attackers.
Anyone with information should call 0131-311 3131 or Crimestoppers on 0800 555 111.