Rowett had been in charge of the Championship side for four years, leading the club to top-half finishes in each of those seasons without being able to secure a place in the play-offs.
His side went into the final day of last season knowing a win would be enough for a top-six finish and they Blackburn 3-1 at half-time, but they collapsed to a remarkable 4-3 defeat to once again miss out on the chance of promotion to the Premier League.
Millwall currently sit 15th in the table, with four wins from their opening 11 league matches. Rowett's final match in charge was a 2-2 draw at home to Hull.
“Firstly, I would like to thank the fans for all their support during my time at the club," Rowett said in a statement.
"The atmosphere they create is truly unique. I have thoroughly enjoyed being manager of Millwall and depart with a feeling that the club has progressed during my tenure.
"As is sometimes the case in football, the time just feels right to part ways."
Rowett arrived at The Den in October 2019 as a replacement for Neil Harris, with his departure coming just three days before the fourth anniversary of his appointment.
During his time in the Millwall dugout, Rowett oversaw 196 matches and in the summer of 2022 signed a new contract, with the club not confirming the length of the deal.
“We greatly appreciate Gary’s efforts throughout his time in charge and he departs with the best wishes of everybody connected with the club,” Millwall chairman James Berylson said.
“While my time working directly with Gary has been short, I have thoroughly enjoyed all our interactions and feel that he leaves us having enhanced the club’s on-pitch status during four successful years in charge.”
Assistant manager Adam Barrett will take charge of the first-team squad as caretaker boss when Millwall travel to face Preston in the lunchtime kick-off on Saturday, and he will be supported by coach Paul Robinson.
Berylson added: “In Adam and Paul we have two excellent coaches who I know fans will really get behind during their time in caretaker charge.
“They have my full support as we take the necessary time to secure the appointment which is in the best interests of the football club.”