The result left their Copa del Rey semi-final pairing evenly poised after the first leg.
The Brazilian winger, who started in place of Lionel Messi, curled home in the 58th minute to pull the holders level after Lucas Vazquez sent Real Madrid ahead early on.
Vazquez struck after just six minutes to silence the Nou Camp at the end of a slick team move, with Santiago Solari’s side impressing in the opening stages.
However, Ivan Rakitic clipped the crossbar with a header as FC Barcelona fought for an equaliser.
Malcom eventually found it when Luis Suarez’s shot rebounded to him off the post.
Messi, who suffered a thigh injury at the weekend against Valencia, appeared for the final half hour but could not help champions FC Barcelona find a late winner.
The second leg takes place on Feb. 27 at the Santiago Bernabeu.(Reuters/NAN)