The Second Division side had goalkeeper Craig Nelson to thank for keeping Kilmarnock at bay in the first half, but he could not produce more heroics 13 minutes after the break to deny Frazer Wright. The visitors' tensions were eased on 65 minutes when a stunning shot from Craig Bryson made sure of their place in Monday's draw.
Brechin created the first chance of the game after only eight minutes when Gary Twigg got himself on the end of a Kevin Byers cross and expertly lofted it over goalkeeper Alan Combe. Twigg had turned to celebrate when the assistant referee called him back with a raised flag.
Kilmarnock knew they were in for a scrap at Glebe Park and were determined to get the opening goal to take the sting out of the game.
They almost did that after 13 minutes when Medhi Taouil picked out Wright inside the box with a free-kick but his powerful header was saved by Nelson.
Brechin almost snatched the lead 60 seconds later as they broke upfield, with Twigg clipping the ball through for Ian Diack, but his low drive was too quick for everyone.
Nelson kept his side in the game on 16 minutes, this time diving to his near post to pluck the ball away after Allan Russell – making his Kilmarnock debut after injury – had planted a header goalwards. The 37-year-old keeper was in inspired form and made another crucial save on the half-hour mark to deny Bryson.
Russell's debut was curtailed at half-time as Willie Gibson was introduced to the action after the break.
Kilmarnock finally got the breakthrough after 58 minutes. Taouil's free-kick from the right caught Brechin square and they left Wright in far too much space to shoot low beyond Nelson.
Kilmarnock's second goal came seven minutes later as Garry Hay linked well with Gibson and Hay's low cross landed perfectly for Bryson, who flicked an unstoppable shot into the top corner.
Brechin: C Nelson, Murie (Walker 74), White, Dyer, Seeley, Byers, Nimmo, Janczyk (A Nelson 69), D Smith, Twigg, Diack (King 68). Subs: C Smith, King, McCluskey.
Kilmarnock: Combe, Fowler, Ford (Murray 70), Wright, Hay, Invincibile, Pascali, Bryson, Taouil, Russell (Gibson 46), Sammon (Simmonds 68). Subs: Skelton, Rascle.
Referee: S Conroy.