The former Dover Athletic, Wingate & Finchley and Bishop's Stortford boss resigned within hours of his side's latest defeat, Tuesday night's 4-1 reverse at Brightlingsea Regent which left with the club four points adrift at the bottom of the table.
Appointed in June after four years out of the game, the 49-year-old succeeded Paul Wickenden at Capershotts with a target of improving on last term's 17th placed finish.
Hayes, who has been doing media work for the Gunners since leaving Dover in January 2011, told the Abbotts squad of his decision straight after the defeat at North Road, their 17th of the season, before offering his resignation to chairman John Martin.
In a statement confirming the departure of Hayes and thanking him for his services, officials said his assistants Paul Joynes and Mark Cutler would take over first-team managerial duties for the immediate future and that they were not seeking applicants for the post in the immediate future.
A spokesman said: "The club would like to place on record its thanks to Martin Hayes for all his efforts and endeavour since taking charge at the beginning of the season and have wished him well for the future. The club are not looking for applications at this time."
As a player, Hayes was Arsenals top scorer with 24 goals in 1986-87 and was on the pitch as a substitute in the final game of the 1988-89 season when Michael Thomas famously scored the title clinching goal at Anfield.
During his time at Dover Athletic, he guided the club to their greatest-ever FA Cup run, reaching the third-round proper, where they lost at Huddersfield 2–0 in January 2011.
Follow us: @rymanleaguenews on Twitter | Ryman League group on Facebook