Sajid Rashid, 45, dodged several attacks from the "huge" knife as he tried to foil the hold-up at his store on Gibraltar Gardens in Dalkeith and said he was fortunate to escape unhurt. His assailant fled with just 180.
The father-of-four had been sitting behind the till at Sprott Newsagents on Tuesday afternoon when the hooded youth burst in demanding cash.
"I know many of the youngsters around here and thought it was one of them kidding me on," he said.
"But when I saw he was hiding a huge knife under his arm I realised this was serious."
Mr Rashid said he instinctively confronted the attacker but after evading "two or three" swings of the knife he backed off and urged the teenager to take the money and leave.
"He seemed nervous and was striking at me with the knife," said Mr Rashid. "He aimed it at my stomach, then grabbed it in both hands and tried to stab into my thigh."
"I thought my life was more important than a few pounds so I told him to just take what he wanted."
He added that the knife was about "an inch-and-a-half to two-inches wide" and about "the length of your arm".
"It was not a normal kitchen knife, it was like a chef's knife," he said.
The robbery at the newsagents on Gibraltar Gardens took place at around 4.40pm.
Mr Rashid's wife Fiza, 40, who had left the shop minutes before it was targeted, said: "I think there's too much of this going on. I had just left as it was pretty quiet and they are generally the times when you should be the most vigilant."
She said her husband had been "shocked" at how "cheaply (the robber] valued human life". "My husband knows 99 per cent of the residents who live around here and everyone gets on with him. We have never had any problems in eight years being here and customers have been coming in nearly in tears asking if we are all right."
Police are now hunting the robber described as being white male, 5ft 6in and aged from mid to late-teens.
He was wearing a navy hooded top with the hood up and black jogging trousers. He seen running towards Allan Terrace in Dalkeith.
"Although he wasn't injured, the victim was left shaken as a result of his ordeal, and we are keen to speak to anyone who can help us identify the suspect," said a police spokesman.
"Anyone who was in the area of Gibraltar Gardens at around the time of the incident, who noticed anyone acting suspiciously there, should contact police.
"Similarly, anyone who recognises the description of the suspect, or who has any other information that can assist our inquiries, should also get in touch."