Dewsbury-born Pyrah, who played for Central Yorkshire League side Ossett earlier this season, produced some lusty blows to make 35 from 23 balls.
He clattered Abdul Razzaq for two huge sixes in the final over before he was caught on the boundary as Yorkshire reached 151-9 from their 20 overs.
Pyrah bowled a tidy four over spell which cost just 28 runs in reply as he collected the man-of-the-match award.
In a dramatic finish, Australian Mitchell Starc claimed wickets from the final two balls of the match as T20 champions Leicestershire closed on 147-9.
Victory moved Yorkshire to the top of the North Group ahead of Friday’s eagerly anticipated Roses match against Lancashire at Headingley.
Friday’s game is expected to attract a bumper crowd and tickets are available from www.yorkshireccc.com