He said: "It is fantastic, it is probably the best moment I have had at the palace. I have been a couple of times, most notably with the Euro '96 England football team but coming back here today to get an MBE is fantastic."
The 41-year-old, whose professional career has spanned more 20 years, said the Prince of Wales asked him if he was "still going strong" as a player.
"I said I was hanging in there - you know the bones were creaking a little bit," the veteran striker joked.
"He asked me if I was going into management, I said, 'maybe, maybe one day, there is plenty of time for that'."
He was released by the Hammers at the end of last season but now plays for Colchester United.
He was accompanied to the investiture ceremony by his 19-year-old son Charlie and his parents Shirley and Paul.