The 18-year-old's previous deal would have expired this summer and was attracting interest from some of Europe's leading clubs.
Dortmund gave Moukoko until the end of this week to sign a new contract when he appeared to be stalling on the deal.
The Germany international has scored six goals and provided three assists in 14 Bundesliga appearances this season.
"It's no secret that I feel comfortable at BVB. I have played in the youth teams, taken my first steps in professional football here and now I'm ready to take the next step in my development together with the club," Moukoko told the official Dortmund website.
"I sense the trust of the coaching staff and have an environment here in which I can develop perfectly.
"I have of course been honoured by the interest from other clubs but ultimately it's a decision from the heart. The fans have always supported me, and I want to give them and the club something back too."
Sporting director Sebastian Kehl added: "Youssoufa is an extraordinary player whom we have developed ourselves and in whom we see huge potential for further development.
"I'm therefore happy that we have been able to convince Youssoufa before the start of what will be such an important second half-season for us that he has the best prospects at BVB and that his journey here is far from over.
"It was important for us to be able to complete the negotiations this week so that we all – and also Youssoufa in particular – could start the 2023 football year in peace and fully focused on the sporting challenges ahead."
Dortmund resume their Bundesliga campaign against Augsburg on Sunday.