Junior Kenyan minister Ferdinand Waititu has been charged with hate speech and inciting violence and suspended from his government post.
The MP denied the charges and was remanded in custody until a bail hearing on Friday.
The charges follow a speech he made against ethnic Maasais on Monday, parts of which were posted on YouTube.
He is the second minister to be suspended over allegations of inciting violence this month.
There are fears politicians may whip up ethnic tensions ahead of March's polls.
Violence has recently claimed more than 100 lives in the south-eastern Tana River area.
In order to prevent a repeat of the deadly violence which followed the 2007 election, the constitution passed two years ago says that any minister charged with an offence must stand down and cannot seek re-election unless acquitted.
Subdued in handcuffs
Mr Waititu has since apologised for his remarks made in reaction to the killing of a street child - allegedly by a Maasai security guard - for stealing a chicken in Nairobi's Kayole suburb.
Two more people died in further unrest in Kayole - a densely populated neighbourhood of his constituency in the capital - on Monday.
The BBC's Duncan Munene in Nairobi says Mr Waititu looked subdued in his suit and handcuffs when he heard the charges read out in court.
"While addressing members of the public you attached words that were calculated to stir ethnic hatred," prosecutor Lilian Obuo told the court.
She said the MP may also face murder charges because of his speech, in which he urged his constituents to chase away members of the Maasai community.
Our reporter says Mr Waititu is a fiery politician who has been arrested by police before for incitement when he protested against the demolition of shanty houses in his constituency.
Allegations of electoral fraud ignited ethnic tensions after the December 2007 poll, leading to the deaths of some 1,300 people and forcing some 600,000 from their homes.
Mr Waititu is a supporter of deputy Prime Minister Uhuru Kenyatta, one of four prominent Kenya facing trial at the International Criminal Court (ICC) in connection with the election violence. They all deny the allegations.
A ruling which had been due on Thursday on whether Mr Kenyatta and another of the ICC accused, former minister William Ruto, can run for the presidency next year will now be made on 19 October 2012.