Ronaldo was first to that landmark after netting in Juve's 1-1 draw with Inter last Saturday - his 27th strike since his move from Real Madrid last year.
He trails Messi by 21 goals this season, though, and is three behind Fabio Quagliarella in the race to finish as the top marksman in Serie A in 2018-19.
But Allegri thinks the 34-year-old will be fired up in the derby clash with Torino on Friday given Messi has caught him in the goalscoring stakes.
"Messi is a good stimulus for Cristiano," he told a news conference on Thursday. "We have a derby and Messi achieved that [600 goals] yesterday.
"He will be fired up to move ahead in the scoring and he aims to finish as top-scorer in Serie A."
Allegri also had words of praise for Aaron Ramsey, who will join the Serie A champions on a free transfer from Arsenal at the end of the season.
The Wales international has already played his last game for the Gunners, with a hamstring injury to keep him out of the final two Premier League matches and the Europa League semi-final with Valencia.
"He is a quality player, with goals in his legs, a lot of energy and great timing. He's a great signing," Allegri said.
Ahead of his summer switch to Turin, Ramsey has posted an emotional farewell letter to Gunners supporters.
He said in a message on Instagram: "It saddens me to say that the game against Napoli was my last game in an Arsenal shirt.
"Unfortunately it left me with an injury that rules me out of the remaining games.
"I am really disappointed not to play until the end and give everything for the club while I am still an Arsenal player.
"Unfortunately it’s out of my hands but I wanted to say thank you to the fans for your support.
"It has been a journey, on and off the field, and so much has happened in 11 years.
"I was a spotty young kid coming in and I’m leaving a man, married, father of three boys and full of pride and good memories that I will treasure.
"It will be emotional this weekend - my last game at home. I Look forward to seeing you there and thank you all again from the bottom of my heart for everything."