Juanmi grabbed the only goal of the game after just seven minutes when he pounced on an error by Dani Alves.
Thereafter, the hosts failed to break down a well-organised Malaga defence, which also frustrated the Catalans in a 0-0 draw earlier in the season.
"We're used to these kind of games. I'd like it to be an accident but it is becoming habit — the opposition close up and we can't find a way through," lamented Barca boss Luis Enrique. "These kinds of results are sometimes a good reminder that other sides have their qualities. You could consider this a deserved defeat."
The loss was all the more of a surprise as Barca came into the game in fine form having won their last 11 games in all competitions, scoring 42 goals in the process.
Their star front three of Lionel Messi, Neymar and Luis Suarez were kept remarkably quiet as Malaga became the first side since Getafe in 2007/08 to keep Barca scoreless over two games in La Liga.
"They scored and shut up shop. They let us use the ball out wide and we tried, but the final ball wasn't there and we didn't create clear-cut chances," added midfielder Sergio Busquets.
Meanwhile, champions Atletico Madrid are now just three points behind Barcelona after they cruised to a 3-0 win over Almeria thanks to a double from Antoine Griezmann.
Valencia also tightened their grip on fourth place as Pablo Piatti struck the winner nine minutes from time in a 2-1 victory away at Cordoba.
Like Sports on Facebook, follow @ETribuneSports on Twitter to stay informed and join in the conversation.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ