The former England head coach had a transformative impact on the province since arriving.
He managed to help the side become of the best sides in Europe, win a Champions Cup, and a handful of Pro14 titles during his time in Dublin.
Lancaster thanked Leinster for this time at the province but admitted that the chance to test himself in France was one that he could not pass up.
"I will be eternally grateful to Leo, Mick and Guy and the whole Leinster organisation for the opportunity they gave me and my family back in 2016," he told the provinces website.
“Initially it was for just one season and here I am entering my seventh and that is a reflection on all the players past and present I have worked with and the people of Leinster and Ireland who have made me and my family feel so welcome.
“I have always wanted to challenge myself as a coach in different ways and the opportunity to coach in France at a club like Racing 92 is an exciting one and I will look forward to that challenge when it comes.
🗣️ | Hear from Stuart Lancaster who sat down to discuss his time with Leinster Rugby, after announcing that he will be joining Racing 92 at the end of the season. #FromTheGroundUp pic.twitter.com/84KL6HNKxd — Leinster Rugby (@leinsterrugby) September 26, 2022
“In the meantime, I really want to give everything to the whole of Leinster Rugby and the supporters in the next eight months as I feel we have more to come as we drive towards the exciting challenge ahead both in the URC and in Europe.”
Leinster head coach Leo Cullen added: "Stuart has been a brilliant asset to Leinster Rugby since he joined us in 2016. He has helped us to grow at all levels, both through his work with the senior team and his willingness to get involved with underage teams as well as clubs around the province, where he is always so generous with his time.
“I think there has always been a realisation that Stuart would move on to a new challenge at some stage. For that reason, we feel fortunate to have had him here for as long as we have, and we wish him, his wife Nina and kids Sophie and Dan the very best in their next adventure with Racing 92 in France.
“We have had some great days together and, on a personal level, Stu has been an incredible support. We will all miss him but I am very excited and enthused to go on and try to achieve further success this season as a group.”
Lancaster will stay for the remainder of the season with Leinster and start his time in France next year.