"We're in a sticky situation at the moment, so there is work to be done quickly; full focus goes into the next couple of months."
Harris will be joined by Dave Livermore, who was also his assistant previously at Millwall, Cardiff and Gillingham, alongside Adam Barrett.
"Neil knows this club as well as anybody and understands exactly what it takes to be successful here," said chairman James Berylson.
"We are in a difficult moment but he and Dave have jumped at this opportunity and that says a lot about their affection for Millwall and their fierce drive and determination to help improve performances and results."
'With sincere regret'
Edwards, 37, joined the club in November as successor to Gary Rowett for his first job in senior management.
The former Chelsea and Everton assistant coach lost 11 of his 19 matches in charge, including a 2-0 home defeat by fellow strugglers Sheffield Wednesday on Saturday.
"This has, of course, been a very tough time and it is not a decision that we have taken lightly," Berylson said.
"Joe has worked incredibly hard during his spell with us and it is with sincere regret that the move hasn't worked out for both parties in the way we had anticipated.
"I cannot praise him highly enough for his professionalism, standards, values, and work ethic, and I am confident he will have a long and successful career as a head coach."
Edwards' assistant Andy Myers has also left the club.
Harris scored 138 times in 431 games for the Lions across two spells as a player.
His first match back in charge will be Saturday's trip to automatic promotion-chasers Southampton.
Millwall are 21st in the Championship, one point above London rivals QPR, and in danger of dropping into League One for the first time since 2015.
Harris will have managed in all three tiers of the EFL this season, having started the campaign at League Two Gillingham.
League One Cambridge confirmed the club had been paid compensation by Millwall.
'Edwards' tenure disastrous'
Analysis - Aaron Paul, EFL presenter for BBC Radio 5 Live and BBC Radio London
The return of Neil Harris comes at a pivotal time in Millwall's season. Joe Edwards' tenure has been disastrous.
A change in style and output was what was hoped for, what became of it was a mess.
Millwall look out of sorts, and have sleepwalked themselves into the epicentre of a relegation battle.
A hat-trick of wins over Christmas offered optimism but seven defeats in eight games is detrimental, and the manner of those defeats has left the faithful at The Den clamouring for a saviour.
It comes in the form of Neil Harris. Millwall's favourite son returns after just over four years away.
His primary job will naturally be to generate results but his appointment is expected to galvanise a fanbase that has been unsettled since the Lions surrendered a play-off place on the final day of last season.
Harris returns as a firefighter, but which way will Millwall turn come the end of a turbulent season?