Southampton today, British media reported.
The politician was giving a TV interview when a man in a hat came through the throng and slapped the egg on to his shoulder. The egg broke on to Mr Miliband's jacket, which he quickly removed and gave to an aide as the man ran off down the street.
He finished the interview in just a shirt and tie, made an exit and went back to his car.
He was there to celebrate Labour's victory in Southampton and declared: "We are back in the South."
After being hit and removing his dirtied jacket, Mr Miliband joked that the man was "obviously not one of my fans".He later Tweeted: "For those wondering about egg's origins, fairly sure it wasn't free range but nothing can take away from cracking result in Southampton..."