Barreda unleashed a flurry of attacks during the day to beat Marc Coma by four minutes three seconds, while defending champion Cyril Despres finished third on the day, 5:35 behind Barreda on a stage raced almost entirely at altitudes of over 10,000ft.
Coma still leads the overall rankings, with Barreda in second place a distant 38 minutes back.
"It was a beautiful special," said Coma.
"This is the first time we've been to Bolivia and it's breathtaking. But the cold and the altitude have left me completely voiceless. There isn't much to do with the motorcycle."
Alain Duclos was the day's big loser, making a navigation mistake early in the day which cost him nearly 20 minutes, and saw him lose third place in the overall standings to Jordi Viladoms by just 32 seconds.
But with Viladoms nearly 40 minutes off second place, Barreda appears to be the only man who can stop Coma winning the 2014 Dakar bike race.
"I didn't really care because the death of Eric [Palante] was still fresh in my mind and the altitude gave me a headache. So I wasn't really focused," admitted Duclos.
"As a result, I got lost in the first part of the special, and thereafter I just tried to make it to the finish.
"Then, in the second part, I woke up and pulled out all the stops to try and get back all the time I'd lost in the first special. At any rate, the motorcycle doesn't miss a beat, the entire Sherco team has worked hard on the machine, and it shows. Nothing to report, everything is well.
Nicolas Casale won the seventh stage of the quads race by 7:40 from Sebastien Husseini, with overall leader Sergio La Fuente in third place a further minute back to stay in charge of the race.
And in the trucks race, Eduard Nikolaev's trio won the seventh stage by 3:45 from the fellow Kamaz truck of Dmitry Sotnikov and his crew, though overall leader Gerard de Rooy was just 49 seconds further back to keep his stranglehold on the race.
Bikes stage seven result
1 Joan Barreda Bort (ESP) 4:13:41
2 Marc Coma (ESP) 4:17:44 +04:03
3 Cyril Despres (FRA) 4:19:16 +05:35
4 Juan Pedrero Garcia (ESP) 4:20:38 +06:57
5 Jakub Przygonski (POL) 4:22:37 +08:56
6 Jeremias Israel Esquerre (CHI) 4:23:45 +10:04
7 Hélder Rodrigues (POR) 4:24:38 +10:57
8 Mario Patrao (POR) 4:25:08 +11:27
9 Olivier Pain (FRA) 4:25:18 +11:37
10 Jordi Viladoms (ESP) 4:25:38 +11:57
1 Marc Coma 26:40:44
2 Joan Barreda Bort + 38:14
3 Jordi Viladoms + 1:16:03
4 Alain Duclos + 1:16:35
5 Jeremias Israel Esquerre + 1:39:29
6 Olivier Pain + 1:50:42
7 Jakub Przygonski + 1:54:52
8 Hélder Rodrigues + 2:08:18
9 David Casteu + 2:23:50
10 Cyril Despres + 2:26:13