"This was a difficult decision that I've thought long and hard about," Gretzky said in a statement Thursday on his Web site. "We all hoped there would be a resolution earlier this month to the Coyotes ownership situation, but the decision is taking longer than expected.
"Since both remaining bidders have made it clear that I don't fit into their future plans, I approached general manager Don Maloney and suggested he begin looking for someone to replace me as coach. Don has worked hard and explored many options. I think he has made an excellent choice, and so now it's time for me to step aside."
Gretzky, who is due to make $8.5 million this season, coached the Coyotes from 2005-2009, finishing with a 143-161-24 record, and the team missed the playoffs in all four seasons. Gretzky, 48, also owns a small piece of the franchise.
"As always, Wayne placed the welfare of the team ahead of his own in making this extremely difficult decision," NHL commissioner Gary Bettman said in a statement released by the league. "While the Coyotes have not had the degree of on-ice success that always has been Wayne's objective, there can be no question he has played a vital role in the youth movement that has positioned the Coyotes for success in the future."
Bettman said the league is hopeful Gretzky will have a prominent role with the Coyotes if the NHL's bid for the team is successful.
The Coyotes had no immediate word on a replacement as they prepare to open the season on Oct. 3 at Los Angeles. Associate coach Ulf Samuelsson had been serving as interim head coach during the preseason, and the team this week hired former NHL head coach Dave King as an assistant.
The Coyotes scheduled a 3 p.m. PDT news conference, apparently to name Gretzky's successor.
In a departure from team policy, reporters were barred from the team's noon workout at Jobing.com Arena.
Gretzky is the leading scorer in NHL history. But he brought little of his magical on-ice form when he moved behind the bench. Gretzky's tenure as coach was marked by turmoil as the Coyotes struggled to survive in a crowded sports market.
Gretzky joined the franchise on Feb. 15, 2001, when Jerry Moyes' ownership group completed its purchase of the club. Moyes last May took the team into Chapter 11 bankruptcy, igniting a lengthy and complicated court fight over the team's future.
Gretzky took over as coach in 2005-06. The Coyotes went 38-39-5 in his debut season, winning 16 more games than in the previous season. The team was 36-36-5 with Gretzky on the bench; he missed five games for family reasons.
It was, at times, a trying year for Gretzky. His mother, Phyllis, and grandmother, Betty Hockin, both died during the season.
Assistant coach and friend Rick Tocchet was arrested for allegedly running an illegal sports gambling ring. The scandal touched Gretzky when it was revealed that his wife, Janet, had placed bets.
The on-ice promise of Gretzky's first season never materialized. The Coyotes slipped to 15th in the Western Conference in 2006-07 and didn't finished higher than 12th during his tenure.
Gretzky surrounded himself with friends, including his former player agent, Michael Barnett, who was fired as general manager following the 2006-07 season.
Another close friend, Hall of Famer Grant Fuhr, became the Coyotes' goaltending coach. Fuhr was replaced this week by Sean Burke.
Gretzky's brother, Keith, serves as the Coyotes' director of amateur scouting.
When he signed a five-year extension in May 2006, Gretzky talked about bringing a Stanley Cup to the desert. When he was asked if it would take that long to build a championship team, Gretzky laughed and replied, "It better not, or I won't be here in five years."
Hours after news of Gretzky's resignation broke, the Coyotes issued a statement thanking him for his "dedicated service" since joining the organization.
"Wayne is often credited with the rise of hockey in southern and western markets," the statement said. "He was proud to represent one of those very franchises, and the Coyotes were fortunate to have him. Although his time with the Coyotes has come to an end, the examples he set and the legacy he leaves will undoubtedly have a lasting impact on everyone associated with the franchise."