Eighteen sects, groups and private armies linked to prominent politicians were outlawed yesterday.
Police said they posed a threat to security.
Top of the list were the Mungiki sect and the Taliban vigilantes who were at the centre of Sunday's massacre at Kariobangi, Nairobi, when 21 people were hacked to death.
Thirty-one others were seriously injured when a gang of about 300 youths rampaged through the estate, wielding pangas (machettes) and axes.
Other groups banned by police commissioner Philemon Abong'o were Jeshi la Embakasi, Jeshi la Mzee, Bagdad Boys, Sungu Sungu, Amachuma, Chinkororo, Dallas Muslim Youth, Runyenjes Football Club, Jeshi la Klngole, Kaya Bombo Youth, Sakina Youth, Charo Shutu, Kukacha Boys, Kosovo Boys, Banyamulenge and KamJesh.
Announcing the ban, Mr Abong'o said they had established the 18 groups were "the perpetrators of lawlessness and insecurity in the country."
"These groups are Illegal and Kenyans are advised to keep away from them and their activities. Adherents to the groups will be arrested and charged in court," he warned.
He added: "I have also noted that some people have made a habit of walking in public places carrying offensive weapons such as machettes and axes. This is against the law and anyone found going armed in public will be prosecuted."
Police said the law also categorised rungus (clubs), simis (Somali swords) and spears, traditionally carried by Maasai morans (warriors), as offensive weapons.
President Moi on Thursday ordered police to crack down on illegal organisations to ensure that no group operated above the law.
He told Mr Abong'o to ensure that no group took the law into its own hands and acted as a parallel police force.
The President blamed the police and provincial administration for failing to stop the killings at Kariobangi.
"No-one should blame me if he or she is sacked. I will even appoint retired army generals with good track records to areas where I want to see discipline streamlined," he said.
He added: "If you are sacked don't blame me, blame your work."
Police chief Mr Abong'o said the mushrooming of kiosks and other unplanned structures were a threat to security in most towns because obstructed smooth security operations.
Local authorities should put an immediate stop to them for the sake of security.