6-3 7-6 (7-4) in a match that finished at 03:02 local time.
The former world No. 1, who underwent hip surgery on January 8, will next meet Australian player Alex de Minaur, who beat South Korean star Hyeon Chung 6-2, 4-6, 6-2.
But speaking to a small group of reporters outside the locker room, Murray said he "potentially" could consider not playing. The recovery time is very limited to this point and I think that De Minaur is the sort of player that really will take advantage of any signs of frailties from Murray. The surreal nature of the events was added to by the melancholy "Closing Time" ringing around the arena as Murray tried to gather himself.
"When you're expected to come back and perform the next day, I think that's unreasonable". It's not good for fans, TV, nobody. I know that the weather's tricky for the scheduling.
Copil proved a testing opponent, breaking back when Murray appeared set to move clear in the decider.
It was a third successive three-set match at the tournament for Murray, who defeated American Mackenzie McDonald in the opening round and compatriot Kyle Edmund in his second match on Wednesday. You'll get exclusive coverage of the Ryder Cup, ATP Tour and loads more, starting from just £7.99. "I'd obviously try and sleep as late as I can, but with the way your body clock is and stuff, you know, you might get a few hours' sleep", Murray said.
Rubin played a second match later in the day, falling to 16th-seeded Russian Andrey Rublev 6-3, 6-2.
The Romanian's poor play on the big points in the first set is what ultimately made the set of tennis such a close one, but the World No.93 rallied back from a 0-5 deficit in the first set tiebreak, claiming the next seven points to put Murray momentarily on the ropes.
Copil's habit of missing first serves allowed Murray chances to grab another early break in the third.