The former Ukip leader addressed supporters at a Brexit Party campaign rally on Friday evening at the city’s Corn Exchange.
A sign at the nearby restaurant announced milkshakes or ice cream would not be on sale.
Some politicians have had milkshakes thrown at them during campaigning.
Earlier this month a video of English Defence League founder Tommy Robison being struck by milkshake during a visit to Warrington, Cheshire, was widely shared online.
Ukip candidate Carl Benjamin was also targeted at a rally in Cornwall.
After the police’s intervention in Edinburgh, Burger King’s UK Twitter account posted: “Dear people of Scotland. We’re selling milkshakes all weekend. Have fun. Love BK #justsaying”