Walshaw has been prolific during his two-and-a-half year spell at the Flamingo Land Stadium, but has decided to depart the club in order to join the Bucks.
“Having spent two an and a half years at Scarborough I felt it was the right time to leave the club,” Walshaw said.
“It has been a real honour to represent one of the biggest clubs in non league football and I’m proud to have achieved what I set out to do when I signed for the club.
“I would like to take this opportunity to thank the fans for their support throughout my time and I will never forget the ‘what a waste of money’ chant, you really are some of the best fans in non league.
"I would also like to thank everyone at the club past and present for making me feel welcome and I believe I have made a number of friends throughout my time.
"I am proud of the memories I have achieved with the club and to gain promotion in my first season and win two consecutive Premier League top scorer awards was particularly special.
"I would like to think I have given my all every time I have put on a Boro shirt and the club will always hold a special place in my heart."