Bach, who heads the German Olympic Sports Confederation, said in an interview both cities had shown a keen interest in bidding for the Games in a country that last staged a summer Olympics in 1972 in Munich.
"The DOSB must evaluate the election for the 2020 Games host because we have a strong interest in a summer bid through Berlin and Hamburg. As soon as possible, that is interest for the summer 2024 Games."
Tokyo, Istanbul and Madrid are in the running for 2020 with a possible win for the Japanese capital increasing the chances for a European host four years later.
The United States, however, is also likely to bid for 2024, hoping to bring back the Games for the first time since Atlanta 1996.
The 2020 host will be elected next year, with campaigning for 2024 starting in 2015.
Berlin in 1936 and Munich are the two German cities to have hosted summer Olympics. Berlin unsuccessfully bid again for the 2000 Games while Leipzig was cut from the shortlist for the 2012 Olympics in Germany's most recent summer Olympics attempt.
The DOSB has to nominate one city from Germany should more than one decide to proceed with an Olympic bid.
Munich is considering a repeat candidacy for the 2022 winter Olympics after missing out on the 2018 Games to South Korea's Pyeongchang.
Any joint bid between Munich and Garmisch-Partenkirchen, like the one for 2018, would need wide public support, Bach said, after that bid was hampered by local opposition.
"Conditions for good chances (for Munich 2022) would be wide support from the local population," said Bach, who is also an International Olympic Committee vice president.
"The second condition is that you have bi-partisan support, coupled with the appropriate financial pledges for the bid itself and for the Games."