The anthropomorphic hamburger character introduced in McDonaldland was the Hamburglar.
The Hamburglar became one of McDonald’s most recognizable fictional advertising characters. He was portrayed as a mischievous figure whose recurring desire was to steal hamburgers, creating a simple comic conflict for television commercials and other promotional material.
The character belonged to McDonaldland, a fantasy setting populated by McDonald’s-themed figures. Grimace, Mayor McCheese, and Officer Big Mac were separate characters, so they are common mix-ups in this question. The Hamburglar’s appearance and personality changed over time, including a later redesign that made him look older and less cartoonishly small.