The decision comes following a 4-1 defeat in an international friendly against Japan on Saturday.
That was a fourth defeat in five games for Flick, who replaced Joachim Low as manager in August 2021.
Flick won just 12 of his 25 games in charge of Germany, with their poor form under the former Bayern Munich manager also including a dissappointing group stage exit at 2022 World Cup in Qatar.
Following Flick out of the exit door are assistants Marcus Sorg and Danny Rohl.
German Football Federation (DFB) president Bernd Neuendorf said in a statement: “The committees agreed that the men’s senior national team needs new impetus after the recent disappointing results.
“We need, in facing the European Championship, a spirit of optimism and confidence in our own country.
“For me personally, it is one of the most difficult decisions of my time in office so far, because I appreciate Hansi Flick and his assistant coaches as football experts and people.
“But sporting success is the top priority for the DFB. So the decision was inevitable.”
The EURO 2024 hosts will take on France in another international friendly in Dortmund on Tuesday with Rudy Voller placed in interim charge.