Murphy, who won the championship in 2005, took an overnight 6-3 lead into the final session and looked set for an easy progression into the next round as he moved 9-5 in front.
However his 17-year-old opponent then won the next three frames, which included breaks of 94 and 70, before a relieved Murphy edged the 18th frame to go through.
Murphy will now face Ronnie O'Sullivan in the second, which will begin on Thursday.
"My last victory here was the semis in 2015, so its been a while," Murphy said after the win. "I got beat in the first round last year and once he starts his comeback at 9-5 I’m just thinking that it is going to happen again.
"You just want to get in the second round and go home and feel like you’re in the tournament. I was bang under it and but for the fluked red and the decent clearance afterwards, it probably would have been a decider and then its a toss of a coin."