Foyle was chosen from of field of more than 40 candidates to fill the vacancy created by Richard O'Kelly's departure from Edgar Street in the wake of the Bulls' relegation from the Football League.
The 49-year-old's last job was with Northwich Victoria, who finished second in the Evo-Stik Northern Premier this season before being relegated for breaking financial rules, and Hereford chairman David Keyte insists Foyle's non-league pedigree was a key factor in his selection.
"We had been strongly advised by many people to appoint a manager who has Conference experience," he told his club's official website.
"Martin certainly has a wealth of experience as a player, coach, assistant manager and - most importantly - as a manager.
"We'll be looking for him to draw on his experience and his contacts within the game to assemble a squad capable of challenging for promotion."