Kaka, back at the Serie A club after a mediocre spell at Real Madrid, set up Robinho's ninth-minute goal with a delicate pass with the outside of his foot and was a constant thorn in Barcelona's side.
Lionel Messi equalised in the 23rd minute to leave the Catalans on top of Group H with seven points from three games, two ahead of Milan and four in front of Celtic who beat bottom club Ajax Amsterdam 2-1.
It was a particularly impressive performance by Kaka given that he was nowhere near fully fit during a start to the season dogged by injury and then had to play on the left wing, most of the time part of his new team's rigid defensive system.
"Having played plenty of times against Barcelona I knew the importance of the flanks. Tactically it needed to be a match of sacrifices," the 31-year-old said.
"I still need to find my best form. The manager knows where I want to play but every now and again you need to make these sacrifices."
Kaka had not started a game for Milan since making a lacklustre debut in a 2-2 draw with Torino in Serie A last month and limping off with a thigh injury.
He also looked a shadow of the player he once was when he made a 20-minute cameo appearance in a drab 1-0 win over Sampdoria at the weekend.
Milan fans, however, have been unstinting in their support for a player who refused his wages while out injured.
"All this affection from the fans is an extra motivation for me," said Kaka. "Every time you play at the San Siro is special."