Luis Suarez struck the only goal of the game in the 56th minute, lashing a loose ball into the net for his 195th goal with Barca which took him past Hungarian Laszlo Kubala as the club’s third top scorer of all time.
Barcelona kept up their pursuit of leaders Real Madrid in the La Liga title race by beating city rivals Espanyol 1-0 at home on Wednesday, also condemning their neighbours to relegation from the top flight.
Luis Suarez struck the only goal of the game in the 56th minute, lashing a loose ball into the net for his 195th goal with Barca which took him past Hungarian Laszlo Kubala as the club's third top scorer of all time.
The goal came shortly after both sides had been reduced to 10 men in a frantic start to the second half.
Barca's teenage forward Ansu Fati was sent off for a reckless tackle five minutes after coming off the bench but Espanyol's numerical advantage lasted only three minutes as Pol Lozano was dismissed, also following a VAR review.
Barca, chasing a third consecutive Spanish title, are on 76 points after 35 games while Real Madrid are top with 77 and can restore their four-point advantage when they host Alaves on Friday.
Espanyol, one of Spain's most prestigious clubs, were relegated for the first time since winning promotion back to La Liga in 1994. They are bottom of the table on 24 points after 35 games.
Barca had produced one of their best performances of the season by hammering Villarreal 4-1 away on Sunday but they looked sluggish at an empty Camp Nou, which normally would have been in full voice on derby day.
"We knew how difficult this game would be because of Espanyol's situation and we were tired from Sunday's game and we played with less intensity," Suarez said.
"But the important thing is that we won the game and picked up more points."
Espanyol frustrated their more illustrious neighbours in the first half with a five-man defence and created the better chances.
Barca keeper Marc-Andre ter Stegen had to be aware to prevent his team mate Clement Lenglet from scoring an own goal just before halftime and Espanyol's Didac Vila fired the loose ball against the post.
Ter Stegen had also come to Barca's rescue earlier, spreading his body and keeping out a low strike from Adri Embarba with his leg.
"We did not play well today," Barca coach Quique Setien said.
"Their defensive shape made life very difficult for us as they were very tight and compact and we weren't precise enough to find a way around it."
Barca found a way through with the help of their three forwards, as Antoine Griezmann raced to the byline and passed to Lionel Messi whose shot deflected into the path of Suarez and the Uruguayan made no mistake.
Suarez now only trails the late Cesar, who netted 232 goals for Barca and record-holder Messi who has scored 630 for the club.