Most of the victims of the 1975-79 regime died of starvation, torture, exhaustion or disease in labour camps or were bludgeoned to death during mass executions.
Between 1.7 and 2.2 million people, almost a quarter of the population, died during the 1975 to 1979 rule of the Khmer Rouge.
The Extraordinary Chambers in the Courts of Cambodia (ECCC), said Khmer Rouge "Brother Number Two", Nuon Chea, 92, and former President Khieu Samphan, 87, were guilty of genocide against the Cham Muslim minority and Vietnamese people, and of various crimes against humanity.
The court sentenced them to life in prison.
Both men denied the charges.
They were already serving life sentences for 2014 convictions for crimes against humanity, in connection with the forced evacuation of the capital Phnom Penh after they took power under their notorious leader Pol Pot in 1975.
There had been debate for years among legal experts at to whether the killings by the Khmer Rouge constituted genocide, as by far the majority of their victims were fellow Cambodians.
The court found that during their rule, the Khmer Rouge had a policy to target Cham and Vietnamese people to create "an atheistic and homogenous society without class divisions", Judge Nil Nonn said in the verdict.
Genocide was committed against the Cham, Vietnamese and Buddhists, he said.
"A great number of Cham civilians were taken ... and were thus killed on a massive scale," he said.
Hundreds of Vietnamese civilians and soldiers were killed at the S-21 interrogation centre, at a converted Phnom Penh school called Tuol Sleng, after being tortured to admit being spies.
"All Vietnamese soldiers and civilians who entered S-21 were labelled as spies and considered enemies," Nil Nonn said. "The fate of these prisoners was a foregone conclusion as they were all ultimately subject to execution."
'Collective humanity'
Both Khieu Samphan and Nuon Chea appeared for the court session but Nuon Chea left after about 40 minutes because of back pain, the court was told. He followed the proceeding on a link from his cell.
Khieu Samphan, looking frail and gaunt, stood in the dock with the help of prison guards when Nil Nonn read the verdict.
The court, a hybrid UN-Cambodian tribunal, was set up in 2005 to bring to justice "those most responsible" for the deaths under the Khmer Rouge, has convicted just three people.
Its first conviction was in 2010 when it sentenced Kaing Guek Eav, alias "Duch", head of S-21 where as many as 14,000 people were tortured and executed, to life in prison.
Two other Khmer Rouge leaders, Ta Mok and Ieng Sary, were facing charges but died before the case was concluded. Pol Pot died in 1998.
Youk Chhang, director of the Documentation Center of Cambodia (DC-CAM), the country's main research centre into the Khmer Rouge atrocities, welcomed the verdict and said it was particularly significant for the minority communities.
"It will affirm the collective humanity of the victims and give recognition to the horrible suffering that they suffered," Youk Chhang told Reuters.
But he said for most Cambodians, the important thing was not the particular charge of genocide, but the affirmation of the punishment.
"What matters most for them is that the Khmer Rouge, who took away millions of people's lives, are in prison for life."
The court, which has been plagued by political interference, is not expected to hear any more cases.
Prime Minister Hun Sen, himself a former Khmer Rouge guerrilla who defected to the regime's eventual conquerors, Vietnam, said he would "not allow" any new indictments beyond the handful of top leaders.