A stunning 25 yard free-kick from Chris Mulhall after just three minutes put the Students in front but the home side hit back quickly through Pat Hoban.
Dundalk took the lead on 31 minutes when Darren Meenan’s corner wasn’t dealt with by keeper Conor O’Donnell, allowing Byrne to apply the simplest of finishes.
The Louth men doubled their advantage in the 36th minute through Daryl Horgan and the game was over as a contest on the stroke of half-time when Brian Gartland sent a bullet-like header to the net from Meenan’s corner to leave it 4-1.
To their credit, UCD didn’t throw in the towel in the second half and pulled a goal back on 76 minutes through a Robbie Benson penalty. But Hoban applied a penalty of his own in the 90th minute to make it 5-2.
DUNDALK: Cherrie; Gannon, Gartland, Boyle, Massey (Rossiter 71); Meenan, Shields, Towell (Higgins 71), Horgan; Byrne (Mountney 87), Hoban.
UCD: O’Donnell; Matthews, Barker, Ryan, Langtry; Morrison (O’Halloran 78), McCabe, Benson, Burke, Mulhall; Belhout (Wilson 87).
Referee: J McKell (Tipperary).