"I say to you kids graduating today, don't forget what got you there. Don't forget your family. Don't forget your grassroots and the community that you are in," Gretzky, dressed in a red gown with white trim, told graduates at the University of Alberta.
He received a standing ovation as the three-tiered auditorium shimmered in the blue and white pops of flash bulbs.
No. 99 received a doctor of laws for his contribution to sport and community.
Hockey Hall of Famer Wayne Gretzky received an honourary doctorate from the University of Alberta on Monday (CP Photo/Adrian Wyld)
Even before he spoke, he was the centre of attention as graduates, prior to receiving their degrees, broke out of the line to meet him.
Gretzky looked surprised when one woman in a black gown and cap hopped into his lap and, with her free hand, took a picture of the two of them to the cheers of the 2,300 packed into Jubilee Auditorium.
Soon another woman jumped into his lap, followed by a male, who handed a camera to Mike Percy, the dean of business, and got him to snap a photo.
Eventually, Gretzky stood and joined the receiving line.
Another woman popped open her graduation gown to reveal an Oilers jersey, which she got Gretzky to sign.
Gretzky, who retired prior to last season as the most prolific scorer in the history of the NHL, had his glory years leading the Oilers to four Stanley Cup wins in the 1980s.
He was named to the Order of Canada in 1984.
The 39-year-old had honorary degree offers from about 10 other institutions across North America, but said he picked the University of Alberta because he felt closest to it from playing in Edmonton for so many years.
He married wife Janet in a lavish ceremony at the city's St. Joseph's Basilica in 1988 that became known as Canada's Royal Wedding.
Janet, pregnant with their fourth child, did not make the trip to Monday's convocation ceremonies. Their three children, Paulina, Ty and Trevor, were also absent.
Gretzky's father, Walter, was on hand as was Oilers coach Kevin Lowe, assistant coach Craig McTavish and former Oilers tough guy Dave Semenko.
It's the second time in less than a year that Gretzky has been feted by his adopted home town.
In October his number was retired leaguewide in a ceremony at Edmonton's Skyreach Centre that was witnessed by fans as far away as Norway.
The expressway that runs past the arena has been renamed Wayne Gretzky Drive.
A bronze statue of Gretzky hoisting aloft the cup already stands outside the building.
Edmonton also marked Gretzky's last brush with formal education.
He attended the local Ross Sheppard high school in the late 1970s while starring as a teenage wunderkind for the Oilers of the World Hockey Association.
Fulfilling a promise to his father, Gretzky stayed in school until he was 18, then dropped out on his birthday.
He finished half of Grade 12 and never went to university.
He said the long road trips -- a staple of professional sports -- made it unworkable to be a student and a hockey star.
It was fitting he was honoured on the same day the business and physical education degrees were handed out.
He returned to the NHL last week as a partner of the Phoenix Coyotes franchise, in charge of all hockey-related decisions, hirings and firings.
He was also reportedly offered a stake in the team and did not have to put up any of his own money.
Gretzky, who now lives in Thousand Oaks, Calif., also starred for the New York Rangers, Los Angeles Kings and St. Louis Blues in his 20-year career.
He holds 61 league records and was inducted into the Hockey Hall of Fame last November after the hall's directors waived the usual three-year waiting period.
By Dean Bennett