Chris Wood's hat-trick earned Birmingham only their second league victory of the season.
Millwall's new signing Liam Feeney had struck a post with a 20-yard effort during a lively start.
Birmingham went ahead in the 29th minute as Morgaro Gomis picked out Jean Beausejour, who crossed for Wood to finish from 10 yards.
Wood added his second from a powerful strike after 62 minutes then nodded in Chris Burke's cross late on.
Birmingham had gone into the game in the bottom three, having taken just four points from four matches, so this was a timely result.
Having to balance their Championship campaign with European commitments has been a challenge, but this result thrusts the Midlands side up into mid-table.
With the home team looking comfortable at 2-0, they brought on Marlon King for his debut after recovering from a knee injury. The former Coventry forward looked keen to impress but fellow striker Wood, on loan from West Brom, took the plaudits for a display of clinical finishing.
Although Wood scored the goals, the biggest threat to Millwall was Beausejour. Playing out wide, he was outstanding throughout. With Chris Burke looking a handful on the other flank, there was plenty of width.
The visitors offered little in a disappointing second-half effort after trailing 1-0 following a first period in which they competed. Millwall's rare attempts were dealt with well by home keeper Boaz Myhill.
Earlier, the visitors looked a much better outfit. Although Wood came close in the opening stages with an effort from the edge of the area, Hameur Bouazza soon took the game to Birmingham. He had a shot saved by Myhill and also fired wide.
Feeney then came even closer by cutting in and delivering the powerful drive that struck a post. Birmingham recovered well though, scoring from a swift counter-attack as Gomis's pass allowed Beausejour to put in the pass that Wood knocked in.
Birmingham, despite having thrown away leads recently, showed no sign of easing off after their opener. Beausejour's corner was glanced wide by Curtis Davies then Burke also steered wide from distance.
Millwall briefly threatened following the break when Jay Simpson forced Myhill into a save but, after that, Birmingham were dominant. Liam Ridgewell's header was kept out by David Forde, but they soon made up for that as Wood drove a hard shot beyond the Millwall goalkeeper.
King then arrived and Chris Hughton's team continued to look good with Davies again agonisingly denied as another header struck a post following Beausejour's corner.
Liam Trotter forced Myhill into a late save but Birmingham made the scoreline more emphatic when Burke supplied Wood to head in his third.
Birmingham manager Chris Hughton said: "Chris Wood is getting better with each game that he plays and each week that he is with us. We are very grateful to [parent club] West Brom.
"It is one that is working well both ways. We know the ability that he has got and he is able to do it on a regular basis now and we are delighted he is showing the form he is showing.
"I think the clean sheet was as important as the goals. We were up against a very tough team that started the game well but we showed great resilience."
Millwall manager Kenny Jackett said: "Our first-half performance was pretty good and we were somewhat unlucky to be 1-0 down. In the second half, I felt that we didn't do enough.
"We didn't really show enough belief. Confidence and belief is part of being a professional sportsman and you have to maintain that and always fight back.
"But it is three league games without a goal. We are aware of that. For us now it is about finding the right combination to score."