Media playback is not supported on this device
There was never more than a frame between the two before Higgins produced a break of 85 to move into a 5-4 lead.
Liang missed a green along the cushion to allow Higgins, who had made three centuries of 119, 104 and 133, to win.
UK Championship winner Neil Robertson had an easier victory as he thrashed an out-of-sorts Marco Fu 6-0.
Fu was ill with a virus on Tuesday and nearly pulled out of the match.
Media playback is not supported on this device
Robertson will now play world number five Judd Trump in the quarter-final on Friday, which starts at 13:00 GMT.
Higgins faces world champion Stuart Bingham from 19:00 GMT on the same day.
"A lot of players will think it was an easy shot on the green, but I knew it was difficult," said Higgins after his win over Liang.
"It was great to come through. We all know he is a great player. He played great today, stuck in there and potted some unbelievable balls."
He added: "If I play like that I have got a chance against anybody."
John Higgins came through a high-quality encounter against tournament debutant Liang Wenbo to win his first-round match 6-4 at the Masters.