18th October 2017, 17:37 | Castleford
The 28-year-old had three seasons with the Tigers from 2012-14 before moving to the Giants and spent the whole of the 2017 season on loan to Hull KR, helping them win back their place in Betfred Super League.
Ellis, who played for St Helens and Leigh earlier in his career, is effectively a replacement for Rangi Chase and will provide competition in the halves with Luke Gale and Ben Roberts.
Castleford coach Daryl Powell said: "I'm delighted to add Jamie Ellis to our squad for next season. He left the club a few years ago and I wanted to retain him then.
"His game has matured significantly since his last time at Castleford and I am confident he will be outstanding for us alongside Luke Gale and give us a great combination at half-back. He has many attributes to his game. His passing ability and running games alongside a very long kicking ability will add to our armoury for 2018."
Ellis, who was in the Tigers team that lost to Leeds in the 2014 Challenge Cup final at Wembley, said: "Since I've been away from Castleford, I've become a bit of a fan and I've really enjoyed watching all of the success that has come to the club.
Buzzing to see @Ellis_2025 back in the black and amber!! Welcome back are kid!!— Oliver Holmes (@Oli_Holmes) October 18, 2017
"I can't wait to get started and be a part of that. My agent called me while I was on holiday and told me that Castleford were interested and as soon as he said that I wanted to sign the contract to come back here."
Ellis made 47 appearances for Huddersfield, who say they have enough cover in the halves following the recent arrival of Jordan Rankin and agreed to release the player from the two years left on his contract.
Giants managing director Richard Thewlis said: "Jamie can formally leave our club now and join the Tigers with our very best wishes."