The Azerbaijani side led the tie 1-0 going into the second leg and Dino Ndlovu scored the vital away goal between strikes from Federico Santander and Andrija Pavlovic for the home side as Qarabag secured progress to the competition proper at the fourth attempt.
Elsewhere, Slavia Prague failed to overturn a 2-0 deficit in its second leg against APOEL, the Cypriot side holding firm at Eden Arena to clinch a 0-0 draw and victory in the tie.
CSKA Moscow ended Young Boys' hopes of qualifying for the group stage with a confident 2-0 second-leg victory, having won the first 1-0.
The Swiss side battled hard to stay in the tie but was broken by Georgy Schennikov's goal from the edge of the six-yard box in first-half stoppage-time. Alan Dzagoev made it 2-0 on the night when he converted Vitinho's cross with a clinical left-footed strike.
Steaua Bucharest went into its second-leg tie with every reason to be confident, having held Sporting CP to a 0-0 draw in Portugal, but was 1-0 down when Seydou Doumbia scored for the visitors after 13 minutes.
Junior Morais levelled matters seven minutes later and it stayed 1-1 until half-time, but Jorge Jesus's men ran riot after the break, with Marcos Acuna, Gelson Martins, Bas Dost and Rodrigo Battaglia all finding the net as Sporting romped through 5-1.
The draw for the groups stage of the UEFA Champions League takes place on Friday (AEST).