The 23-year-old came on at half-time for Manchester City's Nathan Ake and took his place as one of three central defenders, with ex-Red Daley Blind remaining at left-back.
Liverpool's Virgil van Dijk scored the only goal of the game to ensure top spot in the group for van Gaal's men.
Van Gaal outlined the reasoning behind his decision to field Malacia in an unfamiliar role during his post-match interviews.
The wily tactician felt the United new boy's tenacity could prove key in containing Belgium playmaker Kevin De Bruyne and show he can provide an option for the central position during the upcoming World Cup finals, with Bruno Martins Indi, the AZ Alkmaar defender, set to miss the tournament due to injury.