Lamouchi, the first coaching casualty of the tournament, was appointed in January on a contract until 2028.
He leaves the post with matches to come against Japan on Saturday and the Netherlands on June 25.
Tunisia won just one of their five games under Lamouchi, beating Haiti 1-0 in March, while losing 1-0 to Austria and being thrashed 5-0 by Belgium in a pair of World Cup warm-up matches this month.
In a statement on social media on Tuesday, the Tunisian Football Federation said Renard would take charge until the end of Tunisia's World Cup campaign.
"The agreement also stipulates that negotiations will be opened after the World Cup campaign to consider a long-term partnership based on specific sporting objectives," it added.
The country's state-owned broadcaster Television Tunisienne reported Renard would arrive in Monterrey later on Tuesday to link up with the squad.
Renard, twice an Africa Cup of Nations winner, coached Saudi Arabia at the 2022 World Cup in Qatar and led them to a famous victory over eventual champions Argentina in the group stage.
He left to coach the French women's team at the Women's World Cup in 2023 where they lost to the Matildas in the quarter-finals, and the Paris Olympics, before returning to Saudi Arabia and helping the men's side qualify for a third successive World Cup.
He was then replaced by Georgios Donis in the build-up to the tournament.
Earlier, the Tunisian Football Federation announced Lamouchi's dismissal on their Instagram account. Written in Arabic, the statement was translated by Google.
"An agreement has been officially reached to dismiss coach Sabri Lamouchi," the statement read.
It was subsequently reported the Tunisian Football Association were holding an emergency meeting, and Lamouchi had taken training.
"We have a problem with the coach," a Tunisian Football Association official told ESPN.
Tunisian media had reported there was a lack of harmony between the team's experienced players and newcomers. The team's Africa Cup of Nations campaign last winter ended with a disappointing defeat to Mali in the round of 16.
The Frenchman previously managed the Ivory Coast squad at the 2014 FIFA World Cup but failed to advance beyond the group stage.
In 1998, Tunisia sacked Henryk Kasperczak after two group games, both losses. They drew the third match but still came bottom of the group.
with DPA