Romanian slammed her racket to the tennis court causing the frame to crack and come apart which resulted in a code violation for racket abuse.
Serving ahead 3-2 game point, Townsend hit an overhead winner to hold serve to lead 4-2.
The American then served with two match points at 5-4 40-15 after Halep netted two down the line backhand passes on the two previous points.
Townsend double-faulted on match point one before Halep struck a down the line backhand passing shot winner to reach deuce.
Halep then broke serve to level the set at 5 all following two Townsend netted backhand volleys.
Both players held serve in the two following games to reach a decisive tiebreaker.
Townsend struck a down the line backhand winner which she followed up with a crosscourt backhand volley winner to lead 2-0.
A Halep double fault followed by a Townsend down the line forehand volley winner sent the American ahead 4-3.
Two consecutive missed backhand passes from Halep ended the match as the American had rushed the net on seven of eleven of the tiebreaker points.
Looking more like her idol the tennis legend Martina Navritilova than a 116th ranked qualifier, the 23 year old Townsend rushed the net a total of 106 times to win the stunner.
Townsend won the 2012 Australian Open junior singles title before finishing that year as the top ranked girls’ junior.