After a month long winter break that was frustratingly extended by their postponements at Crystal Palace and Coventry City last week, both sides picked up the pace straight away with tough encounters against their south London rivals.
In a hard fought match at Little Heath, Mehmet gave the under-19s a 30th minute lead from the penalty spot after Greg Pearson had been fouled by a Millwall defender inside the area, but the visitors equalised early in the second half when a free-kick took a deflection and wrong-footed Glenn Jackson.
Hammers hit back, though, just 15 minutes from the end when Pearson's shot was parried by the goalkeeper and Marce Collington followed up to stab the ball home.
The Lions roared back in search of another equaliser, but the Hammers defence stood firm - with Elliott Ward particularly outstanding - and the three points were clinched when Freddy Eastwood raced clear on to Collington's pass in the final minute and finished well.
Said Tony Carr afterwards: "It was a very tough game, physically demanding, and the players handled it well considering some of them hadn't played for over a month.
"Millwall made it hard for us, but we fought well and took our chances when they came. We have no injuries, so that is a bonus and, all in all, it was a pleasing performance after the winter break."
Team: Jackson, McClenahan, Tattam, Ferdinand, Ward, Lumsden, Collington, Carrick, Mehmet, Pearson (Blewitt 75), Cole (Eastwood 75). Subs unused: Sealey, Laws, Morris.
Meanwhile, a wonder-strike from Danny Bunce and an own goal earned three points for Kevin Keen's younger side.
After making the livelier start and creating three or four good goalscoring opportunities, Hammers were unlucky to fall behind in the 30th minute, conceding from a corner kick.
However, after that slight wobble, Keen's team found their feet again and drew level on the stroke of half-time, when Bunce curled a delightful free-kick from the corner of the penalty area that flew into the far top corner of the net.
Millwall enjoyed the better of the play early in the second half, but it was Hammers who found the vital breakthrough and claimed what proved to be the winner with 20 minutes remaining.
Sos Yao raced down the right and whipped in a dangerous low cross that a Millwall defender could only divert into his own net as he desperately tried to clear the ball.
The Hammers defence then held firm as the hosts threw caution to the wind in the final minutes, leaving Keen happy with his team at the final whistle.
"It was very pleasing to get back to winning ways after the long lay-off," he said. "We were unlucky to go behind after starting the game very well, but Danny Bunce's tremendous goal got us back in it and, overall, I would say we edged it and deserved the three points.
"After scoring the second we defended very well, with central defenders Liam Parrington and Jamal Henry very strong, and the players showed great character once again."
Team: Reed, Wright, Henry, Parrington, Bunce, Cohen, Tucker (Lee 70), Noble, Singh (White 85), Yao, Allen (Stokes 80). Subs unused: Behcet, Ephrain.