May, who also held talks with Wednesday's Championship rivals Rotherham, heads to England after scoring 67 goals in just 118 appearances in his career so far.
The 21-year-old began his career with the Saints and made a goal-scoring senior debut when he stepped off the bench aged just 16.
May joined Alloa Athletic on loan in 2011 to earn some first-team experience and scored almost a goal a game, finishing with 19 from 22 appearances.
The Scotland Under-21 forward joined Hamilton Academicals on loan, scored 25 goals in 33 games, and was named the SFL Phenomenal Young Player of the Season.
May returned to McDiarmid Park last season and scored 27 goals to help the Saints reach the Scottish FA Cup for their first time in their history.
The Scotland U21 striker also found the target in the Europa League last Thursday in what was his swansong for the club.