Organisers of the march called for the German government to implement the 2015 Paris plan to shift the world economy from fossil fuels.
Thousands of people took to the streets of Bonn on Saturday to call for the phasing out of coal as a source of power ahead of global talks on climate change in the German city next week.
The issue of whether to end coal production has been one of the sticking points in coalition negotiations between German Chancellor Angela Merkel and her would-be allies: the Greens and the pro-business Free Democrats (FDP).
Organisers of the march called for the German government to implement the 2015 Paris plan to shift the world economy from fossil fuels this century.
The implementation of the Paris accord will be discussed at the 195-nation climate meeting in Bonn from November 6-17.
"We expect the Federal Government to finally and effectively implement the Paris Climate Agreement," activist group Campact said in a statement.
The group said 25,000 people took part in the march. A spokesman for the Bonn police said he could not provide an official figure but estimated the number of participants at around 10,000.
US. resident Donald Trump has announced plans to pull out from the 2015 Paris accord to limit global warming. His pro-coal policies and doubts that climate change is caused by man-made greenhouse gas emissions have cast a shadow over the Bonn meeting.