Media playback is not supported on this device
The 32-year-old led 7-2 overnight but Milkins won the first four frames of the day.
But the 2014 champion hit back, his famed matchplay helping him win the next three frames to seal victory.
Selby said: "Rob played some great snooker. But I knew he would let his arm go at 7-2 down."
Four-time Crucible champion John Higgins wasted no time in crushing Welshman Ryan Day 10-3, the Scot rattling off three frames in a row after losing the opener to set up a last-16 meeting with Ricky Walden.
And Northern Ireland's Mark Allen won five frames in a row as he recovered from 2-1 down to take a 6-3 lead against debutant Mitchell Mann in the other afternoon match.
Earlier, a high-quality game saw Nottingham qualifier Michael Holt establish a 6-3 lead over 2010 world champion Neil Robertson.
A brilliant 140 clearance helped Holt race into a 3-0 lead against the Australian world number four, who responded by hitting two consecutive tons to level.
But Holt, who has often talked of his mental struggles on the big stage, recovered with a nerveless 115 and also took the next two frames.
Media playback is not supported on this device
Selby said his decision to pull out of the past two tournaments was taken to enhance his Crucible challenge.
But he admitted he was not at his best as breaks of 50, 61 and 62 helped Milkins, the world number 21, move to within a frame at 7-6 down.
"You have to give credit to Rob for the way he came out. He put me under pressure," said Selby.
"At 7-6 it got a little bit twitchy because it was not as if he got back to 7-6 playing scrappy snooker. He was scoring fluently and playing well.
"I have missed a couple of tournaments and felt a lot fresher, but I was not as match sharp. I didn't want to come into this tournament fatigued, so there were plusses and negatives."
Media playback is not supported on this device
Holt and Robertson play to a conclusion on Tuesday evening, with world number 11 Barry Hawkins facing China's Zhang Anda in the other match.
World number one Mark Selby survived a determined comeback from Robert Milkins to move into the second round of the World Championship with a 10-6 win.