The 25-year-old played 31 games for Hull KR in 2016 but could not help them avoid relegation from Super League.
His loyalty has been criticised by Rovers chairman Neil Hudgell, who says the club supported Walker during child sex charges that were dismissed in May.
"We're looking forward to seeing him develop further at the club," said Saints head coach Keiron Cunningham.
St Helens have signed Scotland international forward Adam Walker from Hull KR on a two-year contract.