Murray, who is seeded second behind Rafael Nadal, received a bye through the first round and he was a convincing winner in his second-round match on Tuesday as he defeated world number 68 Stakhovsky 6-3 6-2 in one hour and 18 minutes.
The world number four will next face either Robin Haase or Santiago Giraldo in the third round in what is his first appearance in the Spanish clay-court tournament in four years.
Murray, who opened his clay campaign by reaching the quarter-finals in Monte Carlo last week before losing to Tomas Berdych, survived a brief scare in the opening game on Tuesday when he needed to save a break point on his own serve.
However, after that the 24-year-old rarely looked in serious trouble against an opponent he had beaten in each of their previous three meetings.
The key break in the opening set came in the fourth game when Murray earned himself three break points.
The Scot failed to make the most of the first two opportunities as 26-year-old Stakhovsky battled back from 15-40 to deuce, but Murray made no mistake with his third chance to take a 3-1 lead in the set.
After the next two games had been comfortably held, Stakhovsky had a chance to break back in the seventh when he edged 40-30 ahead on Murray's serve, but the Ukrainian was again unable to capitalise as Murray recovered to take a 5-2 lead.
Stakhovsky battled hard to take the eighth game to make it 5-3, but Murray wasted little time wrapping up the set as he held the ninth game to love.
Murray then made short work of the second set to seal his spot in the last 16.
The Australian Open semi-finalist rattled off four successive points to recover from 40-15 down to break Stakhovsky in game three and take a 2-1 lead, and he then broke again on his opponent's next service game - this time to love - to take a 4-1 advantage.
The next two games went with serve before Stakhovsky briefly threatened to extend the contest when he took a 30-0 lead on Murray's serve in game eight, but the British number one bounced back to take the game and seal the match.