The 26-year-old from Wakefield joined his hometown club from Leigh Centurions at the start of the 2018 season. During his three years at Belle Vue, he has featured 85 times for the club, scoring 28 tries and kicking 129 goals.
His most prolific campaign came in 2019 when he scored 14 tries, including a memorable brace in the final fixture of the season against London Broncos as Trinity avoided relegation.
Last season, he scored five tries in 13 appearances.
CEO Michael Carter said: “I’d like to thank Ryan for all his contributions to the club over the past four seasons and wish him all the best in his future endeavours.”
Hampshire is the latest in another of high-profile exits after Joe Arundel and Kyle Wood both left the club following the expiration of their contracts.
Since the end of the season, James Batchelor and Lee Kershaw have signed new deals with Trinity.
RUGBY LEAGUE GOSSIP- Wakefield Trinity in for former NRL prop, Castleford Tigers recruitment update as Huddersfield Giants stay hopeful over injured stars.