Chances proved to be few and far between in a goalless first half, with the best opportunity falling to David Zurutuza, who steered his header against the crossbar.
Sociedad came close to opening the scoring once more shortly before the hour when Ion Ansotegi leapt highest inside the box, but his effort failed to test Carlos Kameni.
The missed openings proved costly on the 72-minute mark when Nordin Amrabat played in Juanmi to tap home into an empty net and put Malaga ahead.
Sergi Darder almost added a second for the Anchovies in added time, only for his shot to come back off the post, although Malaga were able to hold out for the remaining couple of minutes to secure all three points.
Javi Garcia's charges move to within one point of a Europa League spot following the win, while Sociedad are one point off the relegation zone.