Media playback is not supported on this device
The 34-year-old former England captain has agreed an 18-month contract with Bryan Redpath's side.
Sinfield was made skipper of the Rhinos in 2002 at the age of 22.
"My entire adult life has been spent at Leeds Rhinos and I am extremely grateful for all the support I have had over the past two decades," he said.
"This was one of the toughest decisions of my career but I know the time is right for me to finish my time in rugby league and embark on a new challenge with Yorkshire Carnegie.
"I never wanted to play against the Rhinos and throughout my career I have always had an admiration for rugby union and wanted to challenge myself in that code.
"I am fortunate as a professional player in this era that opportunities like this exist for me and it is something I want to grab with both hands."
The Oldham-born stand-off made his debut for the Rhinos in 1997 at the age of 16 and has gone on to lead them to six Grand Final wins, three World Club Challenge successes and one Challenge Cup victory.
He was awarded an MBE in 2014.
Sinfield is the second Rhinos legend to announce his departure from the club in the past week, after prop Jamie Peacock revealed he would be joining Hull KR as football manager at the end of the current Super League campaign.
Yorkshire Carnegie executive president Sir Ian McGeechan added: "I have admired Kevin Sinfield as both a player and an individual for many years. His professionalism, attitude and commitment are top class.
"I am sure he will be a great addition to our squad for next season and his goal-kicking record speaks for itself."
Carnegie, who last played in the top flight in 2011, recently appointed former Scotland captain Redpath as their new head coach and currently sit sixth in the Championship.
Leeds Rhinos captain Kevin Sinfield is to switch codes and join Championship rugby union side Yorkshire Carnegie at the end of the rugby league season.