First half goals from Steven Milne and Ryan Conroy booked Dundee's place in the fifth round of the Scottish Cup.
Milne produced a neat turn and shot nine minutes into an entertaining first half, while Conroy doubled the advantage from the penalty spot.
John Baird was upended after some nifty footwork and Conroy drilled in the spot-kick.
Livingston dominated possession in the second half but seldom troubled the visiting defence.
Dundee were full of beans in the first 45 minutes and Baird had the first chance of the game, heading wide after three minutes.
And the Scottish Premier League side took the lead when Milne made a good turn inside the box and sent a low shot into the left-hand corner beyond the reach of home goalkeeper Andrew McNeil.
Barry Smith's side almost doubled their lead five minutes later thanks to a good run up the right wing by Jim McAlister.
He crossed under pressure from the edge of box to Conroy, whose diagonal shot slipped narrowly wide.
Conroy succeeded in making it 2-0 from the penalty spot shortly afterwards, however, after Baird was brought down.
Livingston were furious to be denied a penalty after 20 minutes when Liam Fox's shot from the edge of the box appeared to be handled on its way through to being headed off the line.
Milne had two more close-range chances as the game entered its second quarter, first having an effort headed off the line from a corner, then almost cashing in when McNeil could only parry Baird's raking 25-yard shot, the goalkeeper managing to recover and smother the ball before Milne could get it over the line.
Livingston saw a free-kick from Jesus Garcia Tena saved by Rab Douglas before Baird had a shot deflected out seven minutes from the break.
The First Division side dominated possession as the second half got under way and saw Antony Andreu test Douglas with an early turn and shot.
Burton O'Brien tried his luck with a free-kick from deep in midfield, while Kyle Jacobs brought a good save out of Douglas with a powerful shot which the goalkeeper had to turn round his post.
McAlister's shot into the turf was put out for a corner and the set-piece delivery from the right was saved by McNeil, while Iain Davidson's effort with the rebound was blocked inches from the line by Kyle Jacobs.
Livingston continued pressing and Marc McNulty headed over late on.
An even better opening for the same player right on 90 minutes saw him shoot straight into Douglas' arms.
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +2:22
Marc McNulty produces a right-footed shot from just outside the area that goes harmlessly over the target.90:00 +0:43
Shot by Callum Booth from outside the box goes high over the target.90:00 +0:14
Marc McNulty takes a shot. Save made by Rab Douglas.86:59
The ball is swung over by Craig Barr, Header on goal by Daniel Mullen from inside the box goes harmlessly over the target.85:59
The referee blows for offside against Daniel Mullen. Declan Gallagher restarts play with the free kick.85:00 Substitution
Substitution Lewis Toshney comes on in place of John Baird.82:28
Daniel Mullen takes a shot. Rab Douglas makes a save.75:19
Daniel Mullen is caught offside. Declan Gallagher takes the free kick.73:54
The referee penalises John Baird for handball. Free kick taken by Burton O'Brien.71:37
Inswinging corner taken from the left by-line by Ryan Conroy. Centre by Ryan Conroy, Declan Gallagher takes a shot. Save by Andrew McNeil.70:29 Substitution
Substitution Jordan Morton is brought on as a substitute for Anthony Andreu.68:24
Outswinging corner taken right-footed by Stefan Scougall from the right by-line to the near post, Matthew Lockwood manages to make a clearance.67:55
Kyle Jacobs takes a shot. Save by Rab Douglas.66:31
Ryan Conroy takes the inswinging corner, Keaghan Jacobs manages to make a clearance.65:11
Unfair challenge on Daniel Mullen by Matthew Lockwood results in a free kick. Direct free kick taken by Burton O'Brien.63:32
Burton O'Brien fouled by John Baird, the ref awards a free kick. Jesus Garcia Tena takes the free kick.62:46 Substitution
Substitution Daniel Mullen joins the action as a substitute, replacing Liam Fox.62:36
Shot from just outside the area by Craig Barr goes over the bar.60:54
The referee blows for offside against Martin Boyle. Direct free kick taken by Burton O'Brien.
Free kick awarded for a foul by Martin Boyle on Jesus Garcia Tena. Craig Barr takes the indirect free kick.56:48
Effort from just outside the area by John Baird goes over the bar.56:08
Effort on goal by Liam Fox from long range goes harmlessly over the bar.54:03
The offside flag is raised against Anthony Andreu. Rab Douglas takes the free kick.53:41
Keaghan Jacobs takes a shot. Save made by Rab Douglas.52:51
Free kick awarded for a foul by Kevin McBride on Burton O'Brien. Free kick taken by Jesus Garcia Tena.48:18
Anthony Andreu takes the outswinging corner, clearance by James McAlister.46:42
Free kick awarded for an unfair challenge on John Baird by Anthony Andreu. Kyle Benedictus takes the free kick.45:01
The second half begins.45:01 Substitution
Substitution Steven Milne goes off and Martin Boyle comes on.45:00 +0:03 Half time
Half Time The ref blows to end the first period.41:16
The offside flag is raised against Anthony Andreu. Direct free kick taken by Rab Douglas.38:18
Steven Milne takes a shot. Jesus Garcia Tena gets a block in. Ryan Conroy takes the outswinging corner, Craig Barr manages to make a clearance.36:36
Centre by Kyle Jacobs, save by Rab Douglas.34:19
Foul by Kyle Benedictus on Liam Fox, free kick awarded. Jesus Garcia Tena fires a strike on goal direct from the free kick, save by Rab Douglas. Anthony Andreu challenges Steven Milne unfairly and gives away a free kick. Rab Douglas takes the direct free kick.33:15
Callum Booth sends in a cross, Kyle Benedictus manages to make a clearance.32:20
The ball is swung over by James McAlister, save by Andrew McNeil.29:35
John Baird takes a shot. Save made by Andrew McNeil.23:38
Inswinging corner taken right-footed by James McAlister from the left by-line, Steven Milne takes a shot. Callum Booth makes a clearance.20:56
John Baird takes a shot. Save by Andrew McNeil.20:21
Anthony Andreu produces a left-footed shot from the edge of the area and misses to the left of the goal.19:06
Corner taken by Anthony Andreu, Declan Gallagher makes a clearance. Stefan Scougall takes a shot. Kyle Benedictus gets a block in.17:59
Anthony Andreu takes a shot. Save by Rab Douglas.17:34
A cross is delivered by Kyle Jacobs, clearance by Declan Gallagher.16:37 Goal scored
Goal! - Ryan Conroy - Livingston 0 - 2 Dundee Placed penalty scored by Ryan Conroy. Livingston 0-2 Dundee.15:55
Penalty awarded for a foul by Liam Fox on John Baird.13:11
Effort from deep inside the area by Ryan Conroy misses to the right of the target.11:58
Callum Booth sends in a cross, clearance made by Matthew Lockwood.10:24
Matthew Lockwood gives away a free kick for an unfair challenge on Stefan Scougall. Direct free kick taken by Craig Barr.8:56
The assist for the goal came from John Baird.8:56 Goal scored
Goal! - Steven Milne - Livingston 0 - 1 Dundee Goal scored by Steven Milne from inside the penalty area to the bottom left corner of the goal. Livingston 0-1 Dundee.6:36
John Baird produces a left-footed shot from the edge of the box and misses to the left of the goal.4:56
Liam Fox takes a shot. Clearance by Declan Gallagher.3:14
The ball is delivered by Ryan Conroy, John Baird has a headed effort at goal from close range which goes wide of the left-hand post.0:00
The match begins.
Live data and text provided by our data suppliers