Luiz courted interest during the summer transfer window from AC Milan and Arsenal, who had a £25m bid rejected by Aston Villa on deadline day.
Luiz had a contract running until the end of this season but will now be staying at Villa Park for the foreseeable future.
The 24-year-old Brazil international joined Villa from Manchester City in the summer of 2019 and has made 120 appearances for Steven Gerrard's side.
The club released an official statement to confirm the news which read, "Aston Villa is delighted to announce that Douglas Luiz has signed a new long-term contract with the club. The 24-year-old midfielder joined Villa in the summer of 2019 and has gone on to rack up over a century of appearances in claret and blue. A Brazilian international, Luiz was a gold medal-winner with his country at the 2020 Olympics."
Speaking to the club's official website, Luiz said: "I'm so happy. I'm so happy in this club and I love this club. I love the people here, the staff and the players. I'm so comfortable here and I'm so happy.
"I love this club. This club opened the door for me when I came to England to play in the Premier League. I'm so happy because I'm staying here and my choice is here."
When Aston Villa take on Chelsea on Sunday, Luiz will be hoping to help his side improve on their record of two wins from nine Premier League games this season.