The 26-year-old made nine appearances for Saints this season after joining from Hull KR in October 2016.
Walker could make his debut against his former side Huddersfield on Friday.
Coach Chris Chester said: "I have worked with Adam for a number of years, and we have got a good relationship. He is one of the best young British forwards in Super League."
Wakefield Trinity have signed St Helens prop Adam Walker on a two-and-a-half-year deal.