Fire crews removed the body of the 45-year-old from the lounge area of a property in High Street at around 11am.
When firefighters arrived, they discovered a fire in a second floor flat and a man unconscious and not breathing within the flat. He was removed from the immediate scene by firefighters who began CPR and used a defibrillator on him before ambulance crews arrived.
They then took over CPR before taking him to Edinburgh Royal Infirmary but he was pronounced dead a short time later.
Fifteen firefighters from Dunbar, Haddington and East Linton extinguished the blaze after the alarm was raised by reports of smoking billowing from the building.
A fire investigation into the cause of the fire will now take place.