Luiz has helped Flamengo win the Copa do Brazil and Copa Libertadores since joining on a free transfer from Arsenal in September 2021.
He initially signed a 16-month contract with Flamengo after returning to Brazil.
Luiz, who won 57 caps for Brazil between 2010 and 2017, said: "I think that Flamengo gives you the opportunity, every week, to have feelings that you will not feel in all clubs, in all places and in all games in the world.
"Flamengo is skin deep. You feel it every day. Flamengo training is special, Flamengo's games are special.
"Putting on the Flamengo shirt is special."
Luiz spent 14 years in Europe after leaving Vitoria in 2007 and represented the likes of Benfica, Chelsea, Paris Saint Germain and Arsenal.
His most successful period came across two spells at Stamford Bridge, where he made 248 appearances and won the UEFA Champions League, two Europa League trophies, one Premier League and two FA Cups.
The 35-year-old also won one Portuguese League title at Benfica while his time in France produced two Ligue 1 titles, two Coupe de France and one Coupe de la Ligue.