Goals from Lionel Messi, Cesc Fabregas and Thiago Alcantara handed the Catalans all three points as they extended their lead at the Primera Division summit to 11 points.
However, the Argentina international was quick to applaud Manuel Pellegrini's side for making the match an entertaining spectacle by adopting a positive approach at La Rosaleda.
"Malaga did a good job," Mascherano told reporters. "They played really well. The difference between the two teams was not as big as the score suggested.
"It's exciting to play against teams that want to play football against us and try to play football against us.
"It's fun to play football when the opponents are also trying to score and not just standing and waiting in defense."
The two sides meet again in the first leg of the Copa del Rey quarterfinal on Tuesday, and Mascherano warned his Barca teammates to expect another tricky encounter.
"It’s going to be another tough match, it is a two-legged tie so we must be careful and focused."