A draw was all Madrid needed to move to the next stage after they convincingly won the first-leg 3-1 at the Santiago Bernabeu.
Liverpool now have no chance of winning a trophy this season as they sit in sixth-place in the English Premier League having already been knocked out of both English cup competitions.
Madrid will take on Chelsea in the semi-finals where the Spanish side will continue their campaign for a record 13th Champions League victory.
Manchester City beat Borussia Dortmund 2-1 to advance to the semi-finals.