Murray, who is bidding to reach his first ever final in Barcelona, failed to serve out the first set at 5-3, but then broke Lopez immediately to win it.
A tight second set followed, but the first break proved to be the decisive one as Murray stole the tenth game off Lopez to complete the victory in one hour and 49 minutes.
Murray will face Albert Ramos-Vinolas after he beat Roberto Bautista-Agut 6-2 3-6 6-4 in an all-Spanish affair.
Meanwhile, Britain’s Dan Evans fell 7-6 6-2 to fourth seed Dominic Thiem.
Thiem enjoyed a straight-sets victory over Kyle Edmund on Tuesday and knocked out a second Briton in as many rounds when dispatching Evans to reach the quarter-finals.
Elsewhere, Rafael Nadal overcame South African Kevin Anderson 6-3 6-4 to reach the quarter-finals, where he will face Hyeon Chung, who upset Alexander Zverev 6-1 6-4.
Nine-time winner and reigning champion Nadal looked supreme once more on the Barcelona clay, and with one month to go before the French Open, the Spaniard is emerging as the favourite to claim his first title in Paris since 2014 - all the action from Roland Garros will be live on Eurosport from May 28.
LAST 16 RESULTS
Dominic Thiem (Aut) beat Dan Evans 7-6(5) 6-2
Rafael Nadal (Spa) beat Kevin Anderson 6-3 6-4
Yuichi Sugita (Jpn) beat Pablo Carreno-Busta 6-3 6-3
Hyeon Chung (Kor) beat Alexander Zverev (Ger) 6-1 6-4
Andy Murray (Gbr) beat Feliciano Lopez (Spa) 6-4 6-4
Karen Khachanov (Rus) beat David Goffin (Bel) 6-7(7) 6-3 6-4
Horacio Zeballos (Arg) beat Benoit Paire (Fra) 6-4 3-6 7-6(3)
Albert Ramos-Vinolas (Spa) beat Roberto Bautista-Agut (Spa) 6-2 3-6 6-4
Read the original article on Eurosport: Murray joins Nadal in Barcelona quarters, Thiem too strong for Evans