It was Mr Navalny's first time back in his home country after he was poisoned with the nerve agent Novichok and nearly died, in August.
Footage from the airport showed Mr Navalny kissing his wife goodbye as he was arrested and led away.
The prison service said he was detained for multiple violations of parole and terms of a suspended prison sentence and would be held in custody until a court made a decision in his case.
Mr Navalny, who is President Vladimir Putin’s most prominent and determined foe, has spent the last five months in Germany recovering from the attack with the Soviet-era nerve agent which he blames on the Kremlin.
Moscow has repeatedly denied a role in the opposition leader’s poisoning.
He decided to leave Berlin of his own free will and was not under any apparent pressure to leave from Germany.
The prison service made the announcement after the flight carrying Mr Navalny landed in the Russian capital, though at a different airport to the one scheduled.
It was a possible attempt to outwit journalists and supporters who wanted to witness Mr Navalny’s return.
Russia’s prison service issued a warrant for his arrest last week, saying he had violated the terms of a suspended sentence he received on a 2014 conviction for embezzlement.
The prison service has asked a Moscow court to turn Mr Navalny’s three-and-a-half-year suspended sentence into a real one.
After boarding the Moscow flight in Berlin on Sunday, Mr Navalny said about the prospect of arrest: “It’s impossible; I’m an innocent man.”
Mr Navalny’s supporters, and journalists, had gone to Moscow’s Vnukovo airport, where his plane was scheduled to land, but it ended up touching down at Sheremetyevo airport, about 25 miles (40km) away. There was no immediate explanation for the flight diversion.
The OVD-Info group, which monitors political arrests, said that at least 37 people had been arrested at Vnukovo airport, although their affiliations were not immediately clear.
Vnukovo had banned journalists from working inside the terminal, saying in a statement last week that the move was due to epidemiological concerns. The airport had also blocked off access to the international arrivals area.
Police prisoner-detention vehicles stood outside the terminal on Sunday.
The independent newspaper Novaya Gazeta and opposition social media reported on Sunday that several of My Navalny’s supporters in St Petersburg had been removed from Moscow-bound trains or been prevented from boarding flights late Saturday and early Sunday, including the co-ordinator of his staff for the region of Russia’s second-largest city.
Mr Navalny fell into a coma while aboard a domestic flight from Siberia to Moscow on August 20. He was transferred from a hospital in Siberia to a Berlin hospital two days later.
Labs in Germany, France and Sweden, and tests by the Organisation for the Prohibition of Chemical Weapons, established that he was exposed to Novichok.
Russian authorities insisted that the doctors who treated Mr Navalny in Siberia before he was airlifted to Germany found no traces of poison and have challenged German officials to provide proof of his poisoning.
They refused to open a fully-fledged criminal inquiry, citing a lack of evidence that Mr Navalny was poisoned.
Last month, Mr Navalny released the recording of a phone call he said he made to a man he described as an alleged member of a group of officers of the Federal Security Service, or FSB, who purportedly poisoned him in August and then tried to cover it up.
The FSB dismissed the recording as fake.