Ban, in Bangui for a brief visit en route to Rwanda to commemorate the anniversary of its genocide, told parliamentarians they had a duty to prevent a recurrence of the atrocities that claimed at least 800,000 lives in 1994.
"It is your responsibility as leaders to ensure that there are no such anniversaries in this country," he said, warning that "ethno-religious cleansing" was already happening in the CAR.
"Do not repeat the mistakes of the past -- heed the lessons. The fate of your country is in your hands."
In his speech, he said Central Africa was now in a state of "anarchy", with lynchings, decapitations and sexual violence going unpunished.
Also Read
"Muslims and Christians have been placed in mortal danger simply because of who they are or what they believe. The security of the state has been replaced by a state of anarchy."
Ban said the international community had "failed the people of Rwanda" two decades ago, and now risked not doing enough for the people of the CAR.
He said he had heard "horror stories" from displaced people in Bangui, where food was scarce and living conditions "dire", and warned that the approaching rainy season could make things worse.
Former colonial power France, which has 2,000 troops in Central Africa, has pressed for a UN force to stem the deadly cycle of intercommunal violence that has laid waste to the country.