"It is time for me to get closer to New Zealand. From over there I'll only have to take a plane to go home and the rugby seasons are shorter," said the 35-year-old, who inspired the All Blacks to back-to-back world titles in 2011 and 2015.
Carter played for New Zealand from 2003 to 2015.
After a first spell in the French Top 14 at Perpignan in 2008-09, winning the championship title, he returned to France in 2015 with Racing, winning the national title again in 2016.
Named three times world player of the year, in 2005, 2012 and 2015, Carter has been regarded as one of the top flyhalves in modern rugby.
As quick as he is powerful, Carter is also an excellent kicker, who scored 19 of his team's points in the 34-17 victory in the 2015 World Cup final against Australia.
Last February, Carter apologised after failing a drink-driving test in Paris.
He was cleared of wrongdoing last year after corticoids were found in his urine sample after the final of the 2016 Top 14.
(Reporting by Julien Pretot; Editing by Rex Gowar)
