Striker Vincent Aboubakar scored the opening goal for Beşiktaş in the 10th minute when Anderson Talisca delivered a corner and Aboubakar rattled the net with a powerful header.
Beşiktaş doubled its lead in the 22nd minute, when winger Ryan Babel -- who has not scored a European goal since August 2010 -- placed a low shot into the net.
However, Olympiacos didn't let the Istanbul side enjoy its lead for long, and Tarik Elyounoussi scored a volley which deflected off the back of defender Adriano and beat goalkeeper Fabri.
Olympiacos had another lifeline in the 39th minute when the referee showed Aboubakar a red card for an off-the-ball incident.
In the second half, 10-man Beşiktaş needed to secure its lead to avoid elimination. The Turkish side ended the Greek league leaders' hopes by finding another two goals.
Babel scored another in the 75th minute and Cenk Tosun -- who came on for Ricardo Quaresma -- found the net in the 84th minute.
The Europa League quarter-final draw will take place in Nyon at GMT1200 on Friday.
Last week, Beşiktaş came from behind to draw 1-1 at Olympiacos in the first match of the first-leg.
The teams met for the first time in the UEFA competition in the first leg, but had actually been drawn together decades ago, in the preliminary round of the 1958-1959 European Champion Clubs' Cup.
Beşiktaş coach Şenol Güneş famously guided Turkey to third place at the 2002 FIFA World Cup. A goalkeeper who spent the majority of his playing career with home-town club Trabzonspor, Güneş led Beşiktaş to the 2015-2016 Turkish championship in his first term in charge.
Beşiktaş won their only previous UEFA penalty shootout (5-4) against Liverpool in 2014-2015 UEFA Europa League round of 32 while Olympiacos has never featured in a UEFA penalty shootout.