Leganes went ahead early through Sergio Gonzalez, with Barca unable to find a way through the visitors' defence despite dominating possession.
Pedri said afterwards: "It was a tough game, honestly. It's impossible to be happy. I think we started off a bit sleepy with that goal. We woke up, we created chances but we lacked that spark to get going well and score goals.
"We have to start the game better. When a team like that scores a goal away from you, they put a lot of players back... we had chances, but we lacked that spark. We have to be more clear in front of goal if we want to win games. We have to improve in the League, we've had a bad run and we have to go out like we did in the Champions League, to eat it up.
"There are many games in a row, but that is no excuse because we are well prepared. We must go into the game and finish with the same confidence that we do in the Champions League. If you don't score in football, it is impossible to win."
- Get breaking football news faster with the new Tribal Football app! Download now on iOS and Android to stay ahead of all the latest transfers and football updates. Download now: App Store, Google Play