The Slovakian made the call to abandon the race before the start of Stage 12 in Saint-Paul-Trois-Chateaux, claiming injuries sustained earlier in the Tour had worsened.
The Bora-Hansgrohe star was involved in a serious crash with Australian Caleb Ewan during the Stage 3 sprint to Pontivy.
Sagan battled on after the crash but his injuries flared up again during the past two stages, which forced him to make the call to head home.
"It’s not very nice to be leaving," Sagan said
"The injury I had after the first stage seemed to be getting better and better but then I hit the knee against the handlebars again two days ago in the sprint and it’s swollen. I can’t bend my leg."
There’s nothing I can do but take some rest and get better. If you can't move your leg, where can you go?
It is only the second time in ten starts at the Tour de France that Sagan has failed to finish the three week race.
He was disqualified in 2017 after clashing with Mark Cavendish during a sprint, the Manxman subsequently crashing into the barriers and fracturing his shoulder.
Sagan was later cleared of fault by the UCI after the three-time World Champion’s Bora-Hansgrohe team took the issue to the Court of Arbitration for Sport.