Angela Merkel once again called on Vladimir Putin to release Alexei Navalny on Friday, during talks in Moscow on the first anniversary of the leading dissident's poisoning that he blames on the Kremlin.
The Russian president hit back, claiming Navalny was not in jail for his politics.
He also took a swipe at the West over Afghanistan, calling for countries to stop "imposing foreign rules from outside".
The German chancellor's visit came as she nears the end of her 16-year period in office. Merkel has strived to maintain a dialogue with Moscow, but relations are at a low point.
"I have once again called on the Russian president to release Alexei Navalny, and I have also made it clear that we will stay on the case," Merkel said during a joint news conference.
Putin replied that his arch opponent was not detained "for his political activities", but for "a criminal offence against foreign partners".
Renowned for his investigations denouncing the lifestyle and embezzlement of Russian elites, including the president and his entourage, Navalny fell gravely ill on a plane over Siberia on August 20 last year.
At his wife's insistence, he was flown for medical treatment to Germany, where officials said tests revealed he had been poisoned with a Soviet-developed nerve agent. Moscow rejects his claims that the Kremlin and the Russian security service, the FSB, were responsible.
After five months' convalescence, the Kremlin critic flew back to Russia and was immediately arrested, before being sentenced to two and a half years in prison in a fraud case that he denounces as politically motivated.
The Russian authorities have since been working to dismantle Navalny's network before September's parliamentary elections, branding campaign groups "extremist", blocking related websites and putting his allies and relatives under surveillance.
Putin asserted that "the fight against corruption should not be used for political ends", while assuring that "the fight against corruption is very important" and that Russia will do "everything" to eradicate it.
In a message posted on social media from prison, Alexei Navalny thanked those who saved his life and vowed to continue his struggle.
Putin tackles West over Afghanistan
After a tumultuous week in Afghanistan that has seen the Taliban take advantage of US and NATO troop withdrawals to sweep back to power, Putin criticised the West's 20-year campaign.
"The irresponsible politics of imposing foreign values from outside must be stopped, as well as the urge to build in other countries foreign-guided democracy without considering historical, national or religious uniqueness and totally ignoring the traditions that other countries live by," he said at the joint news conference with Merkel.
In a reference to the doomed Soviet occupation of Afghanistan in the 1980s, he added: "We know Afghanistan well and we learned ourselves how it is structured and how counterproductive it is to try to impose forms of government and public life that are foreign to it."
"It is important now to prevent the incursion of any kind of terrorists to the countries neighbouring Afghanistan, including in the form of refugees," he went on.
Merkel had also said she would raise with Putin the brutal clampdown on dissent in Belarus. Earlier this week the German leader accused Alexander Lukashenko of a "hybrid attack" against the EU by channelling an influx of migrants into Latvia, Lithuania, and Poland in retaliation to the EU's sanctions against Belarus.
Belarus depends heavily on Russian energy supplies and Moscow has authorised loans to prop up the country's beleaguered economy.
Dialogue damaged by Ukraine conflict
The two longtime leaders have managed to hold up a line of communication over the years, Merkel making use of her fluent Russian. But there is little doubt the Ukraine conflict has damaged their the personal relationship, just as it has harmed relations between Russia and the EU.
"I think what she has earned with Putin, and it's mutual, is respect", Dr Stefan Meister, a political analyst with the German Council on Foreign Relations told The Associated Press.
"The big break was the Russia-Ukraine conflict," Meister said, and that it "was a deep disappointment for Merkel, that this relationship of trust that they had, also the languages that they share, was basically broken by him".
The fighting between Russia-backed separatists and government forces in eastern Ukraine erupted after Russia's 2014 annexation of Ukraine's Crimea and has left more than 14,000 dead.
Efforts to negotiate a political settlement under the 2015 Minsk agreements brokered by France and Germany have stalled and the EU has imposed sanctions against Russia for failing to live up to its commitments to the peace agreement in Ukraine.
Merkel spokesman Steffen Seibert said earlier this week that "Russia could do much more" to help the settlement.
Before the meeting, Angela Merkel laid a wreath at the Unknown Soldier's Tomb near the Kremlin wall to honour the Soviet victims of World War II. Despite their differing positions, she pleaded for continued dialogue with Russia.
"Even though we certainly have deep differences today, we speak to each other -- and that should continue to happen," Merkel told her host.
"Germany is one of our key partners in Europe and the entire world thanks to your efforts over the past 16 years," was Putin's reply to the Chancellor.
The German Chancellor is due back in Berlin on Friday night before heading to Kyiv on Sunday to meet with Ukrainian President Volodymyr Zelenskyy.