The second seed was convincingly beaten in the first set by Czech qualifier Minar, the world number 216.
But Spaniard Almagro, the 2010 champion, battled back to take the second-set tie-break 10-8 before breaking and holding to take the decider.
Next up for Almagro is compatriot Daniel Gimeno-Traver, who beat Italian qualifier Alessandro Giansessi 6-4 6-3.
Third seed Alberto Ramos eased past Kazakh qualifier Evgeny Korolev 6-3 6-3 to seal his place in the quarters.
The Spaniard faces Bulgarian starlet Grigor Dimitrov for a place in the semis.
The other two quarter-finals will be between Spain’s top seed David Ferrer and compatriot Tommy Robredo, while Estonia’s Juergen Zopp faces Jan Hajek of the Czech Republic. Those match-ups were determined on Wednesday.