The match started brightly for the Spaniard, who required just one break of Stepanek's serve to take the opening set 6-4.
However, veteran Stepanek provided a sterner test in the second set and as a result a tie-break was required to determine a victor. There was very little to separate the duo in the breaker, with 33-year-old Stepanek eventually coming out on top 7-5.
He failed to build upon that success though as Almagro responded with another decisive break in the third set, which allowed him to take a 2-1 lead thanks to a 6-3 success.
Almagro was now in the ascendancy and he pressed home that domination in the fourth set with a string of forehand winners that Stepanek was unable to deal with. The 27-year-old eventually booked his place in the next round with a 6-4 triumph.
Frenchman Gilles Simon awaits Almagro to decide who will advance through to round three.