In the second crime scene a short distance away, authorities found the alleged suspect dead, Der Bild reported.
Police said in a statement that the suspect shot himself and his mother at home.
About 5am, police confirmed that the attacker had been found. Officials tweeted: "Suspected culprit was found lifeless at his home address in #Hanau".
Hanau is about 20 kilometers (12 miles) east of Frankfurt.
Forensic police work at a crime scene in front of a bar and hookah lounge at the Heumarkt in downtown Hanau, near Frankfurt, on Thursday.
The shooter left a letter acknowledging his actions and expressing far-right views, Bild reported. "One of the two dead people found is highly likely the perpetrator". Witnesses reported hearing about a dozen gunshots, and at least three people were killed.
Federal prosecutor Peter Frank said the gunman had posted videos and a hate-filled, 24-page manifesto on his website, which has since been taken down.
A heavy police presence was in place in central Hanau, with officers cordoning off the scene of one of the shootings as a helicopter hovered overhead.
Relatives and friends of the victims gathered at the Arena bar around midday Thursday, an AFP reporter said, tearfully embracing one another.
Last October, a gunman who denounced Jews opened fire outside a German synagogue on Yom Kippur, the holiest day of the Jewish year, and killed two people as he livestreamed his attack.
In wake of Astros’ cheating, Pete Rose asks Major League Baseball for reinstatement
This is a league that loves the fruits of cheating on Saturday night, and then seems to grow a conscience on Sunday morning. Rose said his gambling was no worse for the game than the recent sign-stealing scandal by the 2017 Houston Astros .
"There is much to indicate that the perpetrator acted out of far-right extremist, racist motives".
The shootings took place around 22:00 local time (21:00 GMT) on Wednesday, and the first target was the Midnight shisha bar in the city centre of Hanau.
The rise of the AfD's political movement has been mirrored in a rise of far-right extremism that included two high-profile attacks a year ago.
Many people were out watching the Champions League soccer match between German club RB Leipzig and English rivals Tottenham Hotspur, a local bar owner told Bloomberg.
The attacker then fled the scene by auto, according to police, before carrying out a second attack at the Arena Bar and Cafe in Kurt-Schumacher-Platz.
But far-right attacks have become a particular concern for German authorities.
Gun violence happens in Germany at a rate far less frequent than in the United States, but it is not unheard of.
Police identified the suspect's address from eyewitnesses who saw his vehicle, and stormed his apartment in Hanau hours later, where they found him dead. "With the injured, we hope they will soon recover".
Just last week, 12 people including a German police employee were arrested and accused of plotting to create "civil war" with attacks on migrants, asylum seekers, politicians and Muslims.
Hanau is also close to where Walter Luebcke, a Hesse lawmaker from Dr Merkel's CDU who supported her refugee policy, was gunned down a year ago.