Sam Allardyce’s side had beaten hosts Schalke on penalties on Saturday following a 0-0 draw, but struggled to contain a fluid Malaga side.
The Spanish club took the lead on 22 minutes when summer signing Aaron Cresswell failed to clear Arthur Boka’s through ball and Ezequiel Rescaldini finished past Adrian.
Just two minutes later, Malaga increased their lead when Juanmi laid the ball across goal for Luis Alberto, who is on loan from Liverpool, to score.
Alberto should have scored his second of the game on the half-hour mark when he was fouled in the box by Carl Jenkinson, but his penalty was saved by Adrian.
West Ham struggled to create any clear-cut chances and Alberto had a second goal ruled out early in the second half for offside.
Adrian then made another smart save from Rescaldini before former Manchester City striker Roque Santa Cruz missed a golden chance to score on 79 minutes after West Ham’s keeper had spilled a shot.
West Ham face Sampdoria at home next Saturday in their final friendly before starting the new Premier League season against Tottenham Hotspur at Upton Park on August 16.