The Liberal Democrat MP for East Dunbartonshire was at a charity cake sale on Saturday when she unwittingly began eating a biscuit that contained nuts.
Her mouth began tingling and before long she went into anaphylaxis shock.
Her mother drove her to Glasgow’s Southern General Hospital where doctors injected her with her own EpiPen, an emergency adrenaline injector, after she collapsed, struggling for breath.
“I had taken the precaution of writing out what had happened in case my throat swelled up so much I couldn’t speak,” she said.
Ms Swinson, 33, has suffered from a peanut allergy for 30 years but said this was the worst reaction she had experienced.
“It’s difficult to always know whether something contains nuts or not – and this time I got it wrong,” she said. “It was a very scary experience. Luckily, once you get the right treatment you recover very quickly from it – but the bottom line is that if you don’t get help, you can die.”