Ellershaw started on the bench as Biggleswade took an early lead with a converted try.
Dees closed the gap to 7-3, when captain Kevin Boland was successful from the tee, but a break from the visitors; scrum led to another try as they led 12-3.
Dave Marshall’s side hit back through an unlikely source, Scott Warren, who ended his long scoring drought.
Josh Klymyszyn took a quick penalty and drove forward, with the ball ended up in the hands of Warren, who put down for a try, Boland adding the extras, narrowing the deficit to 12-10.
HATTERS RATED: Luton Town 0 Preston North End 1
Ex-Spurs youngster reflects on 'bittersweet' Championship debut for Luton against Preston
Jones left frustrated once more as Town fail to take their chances during Lilywhites defeat
Jones assures Lockyer and co they are still 'key' members of Luton's squad
'Embarrassed' Hatter boss hits out at one of the 'worst' individual performances he has ever seen after Town's cup exit to Exiles
It was Ellershaw’s introduction that proved an inspired switch as he scored within a minute of being on the pitch.
The move was started when Ashley Warren offloaded to Ellershaw, who drove over the line.
Boland added another successful conversion as Dees moved 17-12 in front.
Bidwell Park was rocking and the supporters didn’t have to wait too long to get more, as forward Stuart Calder grabbed another five points before the interval.
Ellershaw pushed forward and drew in the opposition defence, while Boland exploited the space to put Calder in, Boland’s boot making it 24-12.
Half-time substitutions saw Ellershaw and Jordan Warner taken off for Harry Barter and Mattie Anderson as Dees looked for more in the second period.
Scrum-half Klymyszyn added another try when he took a quick penalty and dived over the line, the conversion extending the lead to 31-12.
Biggy closed the deficit with two unconverted tries, but Dunstablians regained focus and were awarded a penalty try, with Boland adding the extras for a 38-22 victory.
Dees visit Olney this weekend.