The South African first five-eighth has been signed on a four-year contract, with the club announcing the deal on Tuesday night.
Lambie, 26, who has 56 caps for the Springboks - the last being in November, 2016, has been able to secure an early release from his contract with the Sharks Super Rugby side and will join the French side from November 1, subject to passing a medical.
"This world-class flyhalf is signed as an 'additional player' and his signature completes the Racing recruitment campaign," the club said in a statement on their website.
Lambie has endured a torrid time with injuries in recent years, including two major concussions, the latest in May that left him sidelined for months as he battled with headaches, light sensitivity in his eyes and neck problems.
His move to France does not affect his availability for the Boks as he has passed the 30-cap threshold for overseas-based players to be eligible for selection.
While also able to play fullback, it's the No 10 spot which Lambie is likely to take over at Racing, with the club having recently made it clear they were on the lookout for fresh talent in the pivot spot.
Carter, 35, is in the third and final year of his contract and he already began the Top 14 season at second five-eighth- the position he first came into the All Blacks in, back in 2003 - as 33-year-old former French international Remi Tales took the reins at first-five.
Keeping the goalkicking duties, Carter kicked two conversions and two penalties from No 12 in Racing's season-opening 25-21 home win over Castres Olympique. He was then reinstated at first-five and Tales was unused on the bench in the 23-19 away loss to Agen, before Tales was back at 10 and Carter wasn't in the 23 in last weekend's 25-6 away win over Brive.
Photo by: HENRY BROWNE/REUTERS (Caption: Dan Carter is set to take on the second-five role permanently for Racing 92, after the club signed Patrick Lambie).