The 32-year-old has penned a deal at Balmoral Stadium until the summer of 2023 and could make his debut against Cowdenbeath this weekend.
McAllister was with Inverness CT and Brechin City before joining Peterhead in 2011 and in August 2018 became the first player to net 100 league goals in the SPFL era.
Boss Paul Hartley told the club website: "It’s a brilliant signing for us - a real statement of intent from our club. I would like to thank the Cove directors for allowing me to get this deal done and also say thanks to Peterhead for the professional way they have dealt with things.
“It’s a signing we had been looking for - a proven goalscorer who will strengthen the competition for places up front. Rory’s record over the last 10 years has been incredible, second to none, and I actually tried to take him to Dundee a few times when I was the manager there."