Malcolm had given Barcelona the lead in the 83rd minute. However, just four minutes later Mauro Icardi scored for Inter through a curling strike.
Barcelona lead Group B with 10 points while Inter are second on seven points. Tottenham Hotspur, who won their match against PSV Eindhoven 2-1, are in third place.
It was a do-or-die battle for Spurs, who were close to getting eliminated from the competition after finding themselves a goal down with only 12 minutes left. However, England captain Harry Kane scored two quick goals to keep Spurs' hopes of qualifying for the knockout stage alive.
“We were just on the attack all the time. In the end we managed to take a couple but I think we deserved it,” Kane said.
“We had to dig deep and find another level when it mattered."
Spurs still face an uphill task to reach the knockout stage as they need to beat both Inter Milan and Barcelona.
Napoli draw with PSG
In the other big-ticket match, Napoli drew 1-1 with Paris Saint Germain at the Stadio San Paolo. Juan Bernat gave PSG the lead in the first half that was dominated by the Paris-based club.
However, Lorenzo Insigne successfully converted a penalty in the second half to help Napoli secure a draw.
The Italian club is now at the top of Group C, level on points with Liverpool who were shocked 2-0 by Red Star Belgrade. PSG are in third place one point behind the leaders.