The announcement followed meetings of the management boards of both banks, a person with knowledge of the matter said.
"In light of arising opportunities, the management board of Deutsche Bank has decided to review strategic options," Deutsche said in a statement. It said there was no certainty of a deal and that the board was "focused on improving the growth profile and profitability of the bank". Commerzbank said the outcome was "open".
Formal disclosure of talks increases the chances of concluding a tie-up that has long been the subject of speculation and surfaced in 2016 before both banks decided to focus on restructuring.
The German government has pushed for a combination given concerns about the health of Deutsche, which has struggled to generate sustainable profits since the 2008 financial crisis.
The government, which holds a stake of more than 15 percent in Commerzbank following a bailout, wants a national banking champion to support its export-led economy, best known for cars and machine tools.
Berlin also wants to keep Commerzbank's speciality - the funding of medium-sized companies, the backbone of the economy - in German hands.
"We are going to seriously evaluate a merger," said the person with knowledge of the matter said ahead of the announcement.
"But there is no guarantee that there will be a deal in the end," the person added.
An announcement on Sunday represents progress after a person with knowledge of the matter this month told Reuters that the management board of Deutsche had agreed to hold talks with Commerzbank on the feasibility of a merger.
While the banks had not publicly commented on merger talks until Sunday, German Finance Minister Olaf Scholz last Monday confirmed that there are negotiations.
On Thursday, the supervisory boards of both banks are scheduled to hold long-planned meetings, four people with knowledge of the matter told Reuters.
The status of merger negotiations is expected to be discussed. The merged bank would have roughly 1.8 trillion euros in assets, such as loans and investments, and a market value of about 25 billion euros ($28.3 billion), based on Friday's closing stock prices.
It would have one fifth of the German retail banking market and together the banks employ 140,000 people worldwide.
Germany's Verdi labour union has objected strongly to a possible merger between the two banks, arguing that the merged group would be a more attractive target for a hostile foreign takeover and saying that at least 10,000 jobs are at risk.
Some major shareholders have privately said they were against a merger, but the U.S. investor Cerberus, a large investor in both banks, has favoured talks, a person familiar with the matter has told Reuters.
Deutsche, the largest bank in Germany, Europe's biggest economy, emerged unscathed from the financial crash but later lost its footing.
In 2016, the International Monetary Fund called the bank the world's biggest potential risk among peers to the financial system because of its links to other banks.
German officials fear that a recession or big fine, for example, could derail the bank's fragile recovery.
Other than Deutsche, Commerzbank is Germany's only remaining big publicly bank, after a series of mergers.
Commerzbank, like Deutsche, has struggled to rebound, and German officials say it is vulnerable to a foreign takeover. If an international rival snapped it up, that would increase competition for Deutsche on its home turf.