Bayern Munich were very interested in the German international, who would have cost in the region of £50m, but the 23-year-old's contract will now run until 2023.
Leipzig sporting director Markus Krosche said: "Of course, we are pleased that Timo Werner has decided to extend his contract with us and to continue the path we have taken with our club.
"This is a very positive signal and also underscores our goal of tying our core employees to us in the long term and of permanently establishing ourselves in the Bundesliga. Of course, that was a far-reaching decision for his own future, and for that reason, he took the necessary time for it, which we also gave him."
Werner was once again one of the top scorers in the Bundesliga last season, netting 16 goals as Leipzig came 3rd behind Bayern Munich and Borussia Dortmund.
Julian Nagelsmann's side have got off to a good start this season, with Werner scoring in wins over Union Berlin and Eintracht Frankfurt.