The striker tapped in from close range as the hosts pressed for the all-important winner, after Diego Simeone’s men had Arda Turan sent off for a second yellow card with 13 minutes remaining.
Cristiano Ronaldo was denied by Jan Oblak just before the break, while Hernandez earlier spurned two chances from good positions for Real Madrid, who enjoyed the majority of possession as they had in the first leg.
But Hernandez’s late strike would be enough to give Real their first win over Atletico in eight meetings since their triumph in last year’s final and keeps them on course for an unprecedented defence of their crown, with Carlo Ancelotti’s side finding out their semi-final opponents in Friday morning’s draw in Switzerland.
The hosts quickly settled into an early passing rhythm, much as they did in the first leg at the Vicente Calderon, but again they struggled to find their way through a well-organised Atletico defence.
James Rodriguez was the key instigator early on, and he set up a good chance for Hernandez with a pass from the right, but the striker could only slice his effort into the side netting.
Moments later, the two linked up again before Hernandez flicked the ball inside for Ronaldo, who drilled a 20-yard shot wide of the target.
Atletico were spurred on by that chance and started to make their own mark on the game, pressing forward in numbers and making life more difficult for the hosts’ back line. Jesus Gamez stole the ball in midfield and drilled a shot at Iker Casillas as the home fans grew more nervous.
Their nerves were almost calmed just before the break as Dani Carvajal won the ball in midfield before Rodriguez played an excellent pass through for Ronaldo, but he couldn’t find a way past Oblak, who stood firm to turn his shot behind with an outstretched leg.
Real continued to press after the break and Isco’s superb ball through the defence found Hernandez, who didn’t connect properly as his shot scuffed wide of the far post.
Raphael Varane and Sergio Ramos both headed straight at Oblak as the home fans sensed their side were on top but couldn’t find a way through.
But then came a key moment as, with 14 minutes remaining, Turan went in for a high ball with Ramos, who fell in a heap under the Atletico man’s challenge. Already on a yellow card, the midfielder was given his marching orders for his second booking of the match.
Soon after, Hernandez was in again as he spun past Diego Godin to meet Rodriguez’s cross, only to again miss the target. But in the 88th minute the hosts finally broke the deadlock to seal victory.
Ronaldo played an excellent one-two with Rodriguez before squaring across the box for Hernandez who, with Oblak off his line, had a simple finish to send the Bernabeu into wild celebrations.
Atletico’s numerical disadvantage proved decisive in the final stages as they struggled to get hold of the ball or create any chances, and Real held on to make the last four for the fifth season in a row.