Alford, 48, spent six seasons at New Mexico and will replace Ben Howland, who was dismissed Sunday despite a solid 25-10 season that included winning the Pac-12 regular-season championship.
Alford compiled a 155-52 record with New Mexico. The Lobos were 29-6 this season but lost to upstart Harvard in their first game in this year's NCAA Tournament.
Alford, who had agreed to a 10-year contract extension at New Mexico, was apparently the third choice of UCLA. Brad Stevens of Butler and Shaka Smart of Virginia Commonwealth both declined the position, the Los Angeles Times said.
UCLA Athletic Director Dan Guerrero said in a written statement Alford was an established name in college basketball.
"He also connects with a new generation of players and brings an up-tempo and team-oriented brand of basketball to Westwood," the statement said.
The Times said Alford will have his hands full this summer. Attendance has been down and freshman star Shabazz Muhammad is expected to enter the NBA draft.
Officials at New Mexico did not immediately name a replacement but called a Saturday news conference to discuss Alford's departure.
Beyonce flaunts bikini body, Blue Ivy in vacation pics
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need