The incident happened around 12.10pm yesterday at Lidl in Nicholson Street, Edinburgh.
Police said the man "struggled violently" with the guard and stabbed him a number of times with a syringe before running off.
He is aged between 20 and 30, white, around 5ft 7in, with a slim build and bushy hair. He was wearing a sandy-coloured top, a blue body warmer with camouflaged pockets, dark blue jeans and white trainers.
Detective Sergeant Andrew MacRae said: "On being challenged, the man began to struggle violently with a security guard. The security guard was stabbed a number of times by what we believe was a used syringe. He then ran away towards Edinburgh city centre."