Back
The near neighbours came out of the hat together in this morning's draw and are due to face each other at East End Park in the midweek of November 24/25.
Pars won 4-2 at Bonnyrigg on Tuesday night to secure their passage to the round of 16 while League Two Kelty stunned Morton and knocked the Championship side out of the competition with an Innes Murray goal at Cappielow.
It will also be a return to East End Park for Michael Tidser, who is back as Hearts boss for a second time after his 11 games as Dunfermline manager ended in March 2025.
The two teams met in last season's Scottish Cup with a late double from Chris Kane giving Dunfermline a 2-0 victory in the fifth round tie in February.
In six competitive matches, Kelty have yet to beat their larger rival although two of the encounters did end in a goalless draw.