US Open champion Murray, showing signs of rust in his first tournament on the ATP circuit for six weeks, lost a wildly fluctuating opening set, where he trailed 1-5 at one point, before seizing control of the match.
In blazing desert sunshine at Indian Wells, the 25-year-old Scotsman broke Donskoy's serve twice in the second set and also in the third before sealing victory after two hours 17 minutes when his opponent sent a backhand service return long.
"I've struggled here the past couple of years, I haven't won a match," Murray, who had not played competitively since losing to Novak Djokovic in the Australian Open final, said courtside.
"I was a little bit nervous in the beginning and he started very, very well ... he came up with some unbelievable shots. I just tried to hang in there and was hitting the ball much better by the second set."
World number three Murray, a runner-up at Indian Wells in 2009 and a losing quarter-finalist in 2010, said he had initially struggled against the 83rd-ranked Russian's style of play.
"I never saw him play before, so you don't know the patterns particularly well," he added. "He's pretty smart on the court, too. He doesn't kind of go for shots that aren't on and doesn't make many mistakes.
"And I have not played a match for six weeks, so you can't expect to play your best tennis straightaway. He played some really good stuff in the first set. Once I got into more of a rhythm I was able to dictate more of the points."
The 22-year-old Donskoy was playing against a top-10 opponent for only the second time in his career. He lost to 10th-ranked fellow Russian Mikhail Youzhny in the second round at St. Petersburg in 2010.
Murray could not fully explain why he had struggled at the California desert venue over the previous two years, on both occasions being eliminated in his first match, and again on Sunday.
"I don't know exactly," he said. "I felt good before the match today, and I felt good before my match last year, as well.
"This year, I started slow and I was probably nervous because, even though I had been practicing well, having it in the back of your head that you played poorly the last couple of years and struggled, that's always going to be a thought."
Murray will next face Taiwan's Lu Yen-Hsun, who battled past Slovakia's Martin Klizan 7-6 7-6 earlier in the day.
- Sports & Recreation