The deal, which must be approved by creditors at a meeting on August 29, will see Hanwha pay around 50 million euros ($63 million) in cash as well as taking over its debt "in the low hundreds of millions", a statement said.
The South Korean group will take over the Q-Cells' subsidiary in Malaysia and its German research and production site in Thalheim, keeping on about three quarters of its workforce there, it said.
Q-Cells had been the leading German maker of solar cells but announced in April it would file for insolvency as it no longer saw any secure financial basis for a continuation of its business.
The company, which employed a workforce of more than 2,000, had been in dire financial straits amid a series of corporate failures in the solar power sector in Germany recently.