Despite taking the lead three times, Thornton eventually lost this enthralling Scottish Cup-tie on penalty kicks after the teams were tied after 90 minutes.
It was Garry Thomson who gave the Hibs an 8th minute lead with a brilliantly taken free-kick that entered the net via the inside of the upright. This lead lasted just four minutes before Dean Ballantyne rounded Matthew Clark then found the net from a very acute angle.
Thomson then turned provider as he headed Dale Robertson's deep cross back across the face of goal for Ewan Henderson to put the visitors back in front in the 38th minute.
Dunbar were awarded a penalty in the 57th minute with Ian Shanks being booked for it despite not being the 'culprit' as Anes Subasic 'munched grass'. Chris King did what he couldn't the previous week by shooting past Matthew Clark.
A great inter-passing move involving Dale Robertson, Shaun Keatings, Ewan Henderson and Raymond Crichton ended with Garry Thomson making it 3-2 in the 64th minute but ten minutes at the back of this, Ballantyne notched again to send the tie to penalty kicks.
John Johnstone was the home side's hero by saving from Henderson and Thomson leaving his team to take on Kennoway Star Hearts in the second round.
SM Electrical Supplies (Fife) Ltd Hibs Man of the Match – Garry Thomson
Dunbar United: Johnstone, Hogg, S.Tait, Moffat, Gibson, Devlin, Subasic, Gillon, Ballantyne, King, Grant. Subs: Mitchell, Handling, Lees, Smith, McCathie.
Thornton Hibs: Clark, D.Robertson, McMillan, Drummond, Shanks, McGowan, Keatings, Hepburn, Henderson, Thomson, Crichton. Subs: Coleman, M.Robertson, Burns.