A 0-0 home draw had built up Olimpic's hopes of an unlikely upset but Asier Illarramendi eased Real's concerns with the opening goal after 16 minutes and midway through the first half Angel Di Maria converted a penalty.
Real reached the last 16 along with Atletico Madrid, who beat their Madrid rivals in last season's final, and won 2-1 against Sant Andreu earlier on Wednesday to advance.
Barcelona made short work of Cartagena with a 3-0 victory on Tuesday to qualify 7-1 on aggregate.
"We tried to get more goals but the important thing is that we played well and we respected the opposition," Real defender Pepe said.
"We had a good rhythm to our play, the team is united and we are working hard."
Olimpic made the 400km journey from south of Valencia by coach looking to repeat the feats of lower league sides Alcorcon and Real Union who have knocked Real out of the Cup in recent seasons.
The visitors were willing to take the game to Real and attacked down the wings through Alejandro Belda and Denis Najera but they lacked creativity and a cutting edge.
After a slow start, Real began to find their feet and Illarramendi put them in front, finishing clinically from a pass by Jese Rodriguez.
A header from Alvaro Morata was handled by Enrique Alcazar inside the area and Di Maria extended Real's lead as he converted the penalty.
Real controlled the game after the break but despite their possession they struggled to create further chances as Olimpic closed them down well.
"It has been a fantastic experience from the moment the tie was announced. We've had the chance to play in the Bernabeu and although we conceded goals in the first half we have given a good account of ourselves," Olimpic midfielder Eduardo Rifaterra said.