Neil Harris says his resignation as Millwall boss has come "at the right time" for both himself and the club.
Harris, 42, the club's record scorer with 138 goals during his playing career, quit on Thursday after four and a half years in charge at The Den.
Millwall are 18th in the Championship after seven league games without a win.
"It is not a decision made with haste. However, I believe it to be the right decision at the right time, not only for the club, but for me," said Harris.
Having taken over, initially as a caretaker, in March 2015, Harris was unable to prevent Millwall's relegation from the Championship that year but led them back into the second tier by winning the League One play-offs in 2017.
Harris, who made a full recovery after being diagnosed with testicular cancer aged just 23 in 2001, also guided the Lions to two FA Cup quarter-final appearances in 2017 and 2019.
In a statement released via the League Managers' Association, he added: "I truly believe that I leave the club in a very healthy position in terms of infrastructure, staffing and playing squad which gives a new manager a platform to continue the club's development.
"During the last four and a half years as manager, there have been some incredible successes for our club, including two Wembley play-off finals, a promotion back to the Championship, two FA Cup quarter-finals and, now, relative stability in the second tier of England's very competitive league structure.
"I look forward to coming back to The Den to see so many good friends in future."
With Harris' assistant David Livermore also departing the club, first-team coach Adam Barrett has been placed in temporary charge for Millwall's game at home to second-placed Leeds United on Saturday.