Walker, 52, was 10-40 in four years, including 1-11 last season, but has a great deal of experience in the pros. He was an NFL assistant for seven seasons before being named UCLA's defensive coordinator from 2006-08.
In 2009, he took over for Hal Mumme at New Mexico State.
In a statement, Walker thanked athletic director McKinley Boston.
"Unfortunately, I did not get the program as far as I would have liked from a wins-and-losses standpoint," Walker said. "But we do have a better locker room, better kids and a better foundation for the program moving forward."
Offensive coordinator Doug Martin took over as interim coach. Martin was Kent State's head coach from 2004-10.
"Obviously, N.M. State is a place I firmly believe in and that's the reason why I came back," Martin said. "I feel there is unlimited potential for this football program and for Las Cruces as a city to take ownership of this team.
Before coaching the Aggies and the Bruins, Walker coached defensive backs with the Washington Redskins (2004-05), New York Giants (2002-03), USC (2001), the New England Patriots (1998-2000) and Cal (1996-97).
Walker's resignation comes less than two weeks before national signing day. This fall, the Aggies will play as an FBS independent after the end of the WAC as an FBS conference.
"It was a great opportunity for his family. I hope it all works out for him," Boston said.
New Mexico State has not announced plans on its search for a new coach.
Information from The Associated Press was used in this report.