The group, which is aligned to al Qaeda, has said before that it would attack Kenya but so far has never done so.
Last year, the insurgent group bombed Uganda in twin attacks that killed nearly 80 people. It said it was in retaliation for Kampala providing peacekeeping troops that have helped Somalia's government stay in power.
"Kenya has constantly disturbed us, and now it should face the consequences of allowing Ethiopian troops to attack us from Mandera town," al Shabaab spokesman Sheikh Ali Mohamud Rage told a news conference.
The threat comes in the wake of a new government offensive that has seen Somali forces claw back parts of Mogadishu.
Somali troops backed by government-friendly militia have launched operations in several towns across central and southern Somalia including the al Shabaab-controlled border town of Balad Hawa, a few kilometres from the Kenyan town of Mandera, and Ethiopia.
Somali troop numbers have been bolstered by the deployment of hundreds of new recruits trained in Kenya and Ethiopia, local residents and security sources say.
"We have never openly fought Kenya but now we shall not tolerate any more. Kenya has been training soldiers to attack us. It has also given bases to Somali forces we drove away from Kismayu," Rage said.
KENYANS FLEE BORDER TOWN
Al Shabaab has also threatened to hit Ethiopia and Burundi, which has troops protecting the western-backed government in Mogadishu.
Last year, a video posted on the Internet showed chanting men that claimed to be al Shabaab threatening to hit Nairobi for a crackdown on Somalis in the country.
Al Shabaab spokesman Rage disowned the posting then and said he had no idea who was responsible for uploading it.
Kenya has been a victim of al Qaeda strikes twice in the past -- a 1998 bombing of the U.S. embassy in Nairobi and an explosion at an Israeli-owned hotel at the coast in 2002.
The fighting in Somalia's Balad Hawa has paralysed life in the Kenyan town of Mandera and forced residents with homes close to the boarder further inland, an aid official told Reuters.
"Mandera is now a battle ground. Several stray bullets from Somalia and Ethiopia have come towards us. So far more than 15 people have been injured," a staff member at a charitable organisation in Mandera told Reuters.
Some foreigners working for international non-governmental organisations had also left the town for the capital, he said.
Al-Shabaab warns of Kenya terror attack
Veiled protestors hold the flag of Somali rebel group al Shabaab during a demonstration outside the Jamia Mosque in Kenya's capital Nairobi on January 21, 2010. Al-Shabaab spokesman Sheikh Ali Dhere on February 27, 2011 accused the Kenyan Government of being behind “the trouble” in some Somali regions bordering its territory. Photo/FILE