The Brazilian midfielder struck either side of half-time, after Mario Balotelli had given his side an early lead at San Siro, to seal a second consecutive Serie A win.
It was a night to remember for Kaka, whom Milan chief Adriano Galliani had revealed could be leaving the Rossoneri in the summer, and he was delighted following his performance and subsequent standing ovation when he was substituted.
"The goal means many things," he told Sky Sport. "It is a special moment for us, tonight was an important achievement for me to play 300 games and it went better than I could've expected. I am very happy."Two consecutive wins have helped to ease some of the pressure on coach Clarence Seedorf and his team, while also keeping their faint hopes of European qualification alive, and Kaka insisted that despite a difficult campaign there are no problems in the dressing room.
"Football is wonderful and painful precisely because it changes so quickly," he said. "I said last week our locker room was not divided and people could see that tonight.
"We had two wins and a draw now, so these are results that will help us to end the season on a high."