Sean Dyche's side will now entertain the winners of the third round tie between holders Manchester City and AFC Bournemouth, which takes place on Thursday evening.
Burnley, who fielded three debutants including Bailey Peacock-Farrell, Bobby Thomas and Josh Benson, scored in either half to seal their progression in the competition.
Josh Brownhill opened his account for the club with a thunderbolt from 25 yards out before Matej Vydra netted with a cool finish deep into stoppage time.
. Bailey Peacock-Farrell 7
The Republic of Ireland international made a very encouraging debut for the Clarets. An early save when turning Smith's header around the upright was just what he needed. Also saved well from Bodvarsson in the first half. Very vocal.
. Matt Lowton 6
Given an early test by Ferguson and Bodvarsson, but would go on to limit the duo's productivity down Millwall's left hand side. Played some nicely weighted balls into the channels and supplied the pass for Brownhill's winner.
. Charlie Taylor 7
Kept former Rovers midfielder Connor Mahoney quiet throughout. Protected his pocket of the pitch extremely well and was a useful outlet in the final third. Whipped in a number of threatening crosses from different positions on the pitch.
. Bobby Thomas 7
Another positive display from another Burnley debutant. Given a real test on his bow when faced with the physicality of Smith, but dealt with the challenge admirably and with a mature head. Made some well-timed challenges around the penalty area. Photo: Andy Ford
1. Matt Lowton 6
Given an early test by Ferguson and Bodvarsson, but would go on to limit the duo's productivity down Millwall's left hand side. Played some nicely weighted balls into the channels and supplied the pass for Brownhill's winner.
2. Charlie Taylor 7
Kept former Rovers midfielder Connor Mahoney quiet throughout. Protected his pocket of the pitch extremely well and was a useful outlet in the final third. Whipped in a number of threatening crosses from different positions on the pitch.
3. Bobby Thomas 7
Another positive display from another Burnley debutant. Given a real test on his bow when faced with the physicality of Smith, but dealt with the challenge admirably and with a mature head. Made some well-timed challenges around the penalty area. Photo: Andy Ford
4. Jimmy Dunne 7
The Burnley centre back continues to show a natural ability to perform at the top level. Led the defensive line well, showed good anticipation to cover his full back, made key blocks and was good in the air. Denied by Bialkowski with a second half header.