The Islamist militant group said it had targeted Christians.
Al Shabaab has carried out a series of deadly attacks into Kenya, saying it will continue until Nairobi withdraws troops from an African Union force fighting the militants in Somalia.
"The area ... is a plot where quarry workers live. They attacked at around 1 a.m. on Tuesday. Most of those killed are workers from upcountry," said Alex Nkoyo, commissioner for Mandera County.
"This attack is a clear reminder that al Shabaab and its collaborators are determined to disrupt and subvert our way of life," Interior Minister Joseph Nkaisserry said in a statement about the Mandera raid.
Al Shabaab militants killed 148 people at a university in eastern Kenya's Garissa County in April. After the Garissa attack in April, critics accused the security forces of responding too slowly.
Al Shabaab aims to topple Somalia's Western-backed government and wants to impose its own strict version of Islamic law on the country.