Almost 200 nations will gather in Paris from the end of November to try and agree a new worldwide agreement to curb greenhouse gas emissions and limit the rise in average global temperatures to two degrees Celsius (3.6 Fahrenheit) above pre-industrial levels.
The ministers of G7 - Canada, France, Germany, Italy, Japan, the United Kingdom, and the United States - met for two days in the German port city of Hamburg.
Participants recognized that the G7's efforts should be directed towards getting a world climate deal, German Economy and Energy Minister Sigmar Gabriel told a news conference after the summit.
"I've never experienced so much agreement when it comes to the targets of G7 countries," Gabriel said.
US Secretary of Energy Ernest Moniz said a deal later this year looked more likely than before.
G7 leaders are hoping for a successor to the Kyoto Protocol in Paris after 2009 climate talks in Copenhagen ended in disappointment due to differences between the United States and China.
Germany has made the climate a key issue of its G7 presidency and has called on leaders to pledge tough goals to cut CO2 emissions at a summit in a Bavarian castle in Elmau next month.
In March, the European Union became the first major economy to agree to a target of an at least 40 percent cut in emissions by 2030, compared to levels emitted in 1990.
In a joint statement after the Hamburg meeting, the ministers also promised to improve energy security by diversifying supplies and suppliers.
They also pledged to help improve the energy security of Ukraine. Kiev has been locked in a pricing dispute with Gazprom that resulted in a supply cut-off to Kiev last year.
Temperatures have already risen by about 0.8 C (1.4F) since pre-industrial levels. In 2010, governments set 2C in 2010 as the ceiling to avoid the worst of droughts, floods and rising seas.