Wigan have paid "in excess of £200,000" for Tomkins, who they sold to New Zealand Warriors for a reported world record fee of about £700,000 in 2013.
Tomkins, 26, will return for the 2016 Super League season.
"I am really happy to have this sorted and to be returning home to Wigan," he told the club's website.
"All of my friends and family live in Wigan, a lot of them play for Wigan. It really was a no-brainer for me.
"It's been a fantastic experience to test myself in the NRL but the reality is I am 13,000 miles away from my friends and family."
Wigan chairman Ian Lenagan added on BBC Radio Manchester: "He's back at Wigan which is where he is meant to be."
The Super League club had first refusal on Tomkins, who leaves New Zealand with a year remaining on the three-year deal he initially signed.
The move reunites Tomkins with his two brothers - forward Joel, 28, and hooker Logan, 22 - who have both been regulars in the Wigan team this season.
Tomkins links up again with head coach Shaun Wane whom he is very close to - the 50-year-old coached him during in the youth age groups at the Warriors and they kept in regular contact when he moved to Auckland.
As well as being linked with a move to rugby union, after he played a one-off match in the 15-man code for the Barbarians against Australia in 2013, Salford owner Marwan Koukash said they would consider an offer for him.
Media playback is not supported on this device
After scoring five tries on his first-team debut as a 19-year-old in 2008, Tomkins was a prolific scorer for the Warriors, scoring 144 tries in 152 appearances.
He won a domestic double of the Challenge Cup and Grand Final in 2013.
Tomkins had an encouraging first season in the NRL and was in the top 15 players for tries, try assists and tackle breaks but has featured just twice this campaign because of a knee injury.
England full-back Sam Tomkins will rejoin Wigan on a four-year deal after he agreed to leave National Rugby League side New Zealand Warriors.