Moriarty broke into Surrey’s first team in 2020 and was part of their side that reached the T20 Blast final that season. But he gradually found opportunities harder to come by, and played a solitary game in their County Championship win last year.
He played four games on loan at Yorkshire earlier this year, but will spend the rest of the season with Surrey.
“I’m incredibly honoured and extremely excited to begin this new chapter with Yorkshire Cricket,” Moriarty said. “Headingley is a special place to play, and I’ve really enjoyed my time with the club so far and I’m looking forward to continue creating special memories and improve my game at such a prestigious club.
He added in a Surrey media release: “I am extremely grateful for the opportunities and experiences this club have given me over the past three years. A massive thank you to all players, staff and members for everything. I will look back at my time at Surrey fondly.”
Darren Gough, Yorkshire’s managing director, said Moriarty would “play a big part in everything we are looking to achieve” moving forward. Gough said: “I’m pleased to have secured Dan on a three-year deal. He is a brilliant addition to the team – offering up another bow to our bowling attack – and has impressed at Yorkshire.
“We are so pleased that Dan is staying at Headingley. He is the kind of player and person who will continue to add so much to our dressing room, and we look forward to him enjoying a long and successful career with the club.”
Alec Stewart, Surrey’s director of cricket, said: “It’s always disappointing when a player chooses to leave Surrey to go to another county but after numerous conversations with Mozza I fully understand and respect the tough decision he has taken.
“He feels he will get more opportunities at Yorkshire to further his own career ambitions and I wish him well and thank him for the contributions he has given to Surrey since joining us.”