The win at Dens Park makes it a hat-trick of League Cup wins for Dunfermline against Dundee after last year's 3-1 success in Fife and another 1-0 back in 1989.
Thomas Reilly knocks in the decisive spot-kick as the visitors claim a bonus point, winning the shootout 5-4.
Dunfermline take over at the top of Group D thanks to that early goal from Jackson Longridge.
Dunfermline are sitting deep as Jesse Curran's industry wins a corner. The visitors do enough to clear the set-play and break up the park to win a free kick. Is that it?
We'll get five minutes of stoppage time. Can Dundee find a way back?
A shot from distance fizzes narrowly over the top of the Dunfermline goal as Karl Madianga lets fly. Lee Robinson barely moved. Cool judgement from the goalie or did he realise he was never getting there?
Aidan Connolly returns to the city of his birth as a late sub for the visitors, taking over from Joe Thomson. Being a former United player, he gets a 'warm' welcome from the home fans.
Ten-man East Fife hold on against Forfar Athletic, and it goes to penalty kicks to decide who gets the bonus point.
Dunfermline make their first change as Andy Ryan takes over from Myles Hippolyte. Ryan scored in last week's win at Peterhead and will relish the stretched nature of this game, with lots of space to exploit.
It's an unusual save but any save is a good one, right? Lee Robinson gets caught off his line as Jean Alassane Mendy makes a mess of a close-range header. The Dunfermline keeper is falling back but has time to take another step and spring back up to push the ball over the top.
Now Jesse Curran clips a cross towards the front post and Dundee striker Matthew Henvey can't get the proper contact on it inside the six yard box. Another good chance slips away for the home side.
It's end-to-end stuff now as Dundee go within inches of an equaliser. Elton Ngwatala unloads a powerful shot from 20 yards and the crossbar is still quivering like jelly.
Jackson Longridge flashes a cross down the corridor of uncertainty, leaving Jack Hamilton flummoxed. Myles Hippolyte should really being throwing himself at that. Any touch and it's a goal. The forward knows it too, judging by his anguished expression.
Jack Hamilton spills an awkward, dipping strike from Joe Thomson and it needs a great recovery tackle from Genseric Kusunga to prevent Louis Longridge reaching the loose ball.
The Dundee defender has done himself some damage though and he can't go on. Steven Caulker is off the bench for his first appearance of the season. Not a bad replacement.
Dunfermline have found a second wind, or are Dundee just leaving massive gaps at the back? Myles Hippolyte takes aim for the far top corner but his shot flies wide.
Now the visitors spurn a great chance as Kallum Higginbotham finds Lee Ashcroft on the edge of the six-yard box but the big defender can only power his effort over the top.
Matthew Henvey steals in behind the Dunfermline defence and the teenager is taken out with a rugby tackle from Lee Ashcroft.
The free-kick arcs into a busy penalty box but keeper Lee Robinson gets important fingertips to it as the visitors hack the ball away to safety.
Jean Alassane Mendy races on to a dinked pass from Karl Madianga and lofts a first-time effort over advancing keeper Lee Robinson.
The ball lands on the roof of the net. Dundee are getting closer and closer.
Paul McGowan is seeing a lot more of the ball now as Dundee play with more pace and purpose. He finds Jesse Curran again and this time the cross is much better. Jean Alassane Mendy gets his head on the ball but can only steer it over the top.