Blair, 23, rejected the opportunity to remain with Nigel Worthington at York where he scored 19 goals in 93 games during a two-year spell.
"I'm delighted to sign Matty and he can't wait to start," said Fleetwood manager Graham Alexander
"He's been on our radar for a while and we've had a good discussion with him last week about his ambitions in football as well as ours. He's a player with bags of potential and one who is hungry to build on his one season in the Football League with York City.
"He's quick and a bundle of energy who I could see playing anywhere across midfield. He's also a goal scorer and that's going to be a big boost in an area that caused problems for us last season.
"We've done our homework on him and have heard nothing but positives. One aspect which impresses me is that Matty buys into the team ethic and that, to me, is very important."
- Sports & Recreation
- Nigel Worthington