The world number 63 found himself 2-1 ahead before Murphy responded with a couple of half-century breaks.
Wells, though, edged a tense sixth frame 54-53 and went on to close out a memorable win over the world number six.
"I have had a few good results against top players, but never on the main stage, so this is a monkey off my back, or whatever the saying is, and hopefully now I can produce better form on the TV in matches to come," Wells said in an interview with WorldSnooker.com.
UK Championship winner Ronnie O'Sullivan, meanwhile, coasted past Michael Georgiou 4-1, which included a break of 136.
O'Sullivan, who is up to world number two following his victory in York on Sunday, is chasing what would be a fourth ranking title in eight weeks and will face Robert Milkins in round two.
Earlier, Cao Yupeng hit a stunning 147 during his 4-0 victory over Andrew Higginson.
The 27-year-old was in devastating form as he reeled off further breaks of 72, 56 and 64 to seal a one-sided victory, with Higginson only managing to score a total of 53 points in the match.
Fellow Chinese player Ding Junhui looked to put the disappointment of a first-round defeat at the UK Championships to world number 130 Leo Fernandez behind him with a 4-2 win over Jak Jones.
Australian Neil Robertson, meanwhile, racked up century breaks of 113 and 143 as he coasted past Rod Lawler 4-0.
Elsewhere in Tuesday's first round, China's Liang Wenbo beat Sanderson Lam 4-2, while Scotland's Alan McManus progressed by the same score against Matthew Selt and Northern Ireland's Joe Swail defeated Lukas Kleckers of Germany 4-0.
Jimmy White saw off Thailand's Akani Songsermsawad 4-1, but Welshman Matthew Stevens went down 4-1 to Hammad Miah.
Mark King, the world number 21, is out after a 4-1 defeat to Chinese player Zhang Anda , while Peter Ebdon beat Indian Aditya Mehta 4-2 and Ben Woollaston ousted Mark Allen 4-3.
Related snooker links