Following six goals in the amazing 90 minutes of play, the hosts proved better from the penalty spot and won 4-3.
Notts County took the lead three times and a reshaped line-up of Boro equalised each time.
First, Tom Crawford opened the scoring in 20th minute, but Ashley Fletcher levelled just seven minutes later.
County were up again through Jon Stead but, again, not for long as Enes Mahmutović equalised in the penultimate minute of the first half.
Stead was up on the scoresheet again in the 63rd minute, but so was Fletcher eleven minutes later.