The Bianconeri star struck in the 62nd minute to equalise for his side after Radja Nainggolan had put the hosts in front at San Siro.
The Portuguese star was set up by Miralem Pjanic as part of a neat one-two, finding the bottom-right corner with a powerful low drive from the edge of the penalty area.
The 34-year-old chalked up the milestone before Barcelona star Messi, with the Argentine currently sat on a tally of 597 for the Catalan club.
His strike also makes him only the fourth player in the club’s history to score in both games played for the Turin club at the Giuseppe Meazza Stadium in a single Serie A season, after Gonzalo Higuain, Marco Di Vaio and David Trezeguet.
He has now reached the 20 goal mark for the season, to make it 10 campaigns in a row where he has netted such a tally, across La Liga and Serie A.
The 34-year-old's impressive haul across 28 Serie A appearances has helped the Bianconeri win the Scudetto for an eighth successive season.
He also netted the winner in the Supercoppa Italiana against Milan in Jeddah in January.