Another six people were wounded in the attack at Elwak, some 150 kilometres (95 miles) south of Mandera and on the Somali border.
The assailants ordered everyone off the bus, "demanding that Muslims separate from Christians, but they refused," the interior ministry said in a statement.
Those who refused to identify themselves as Muslims "sent a very important message of the unity of purpose, that we are all Kenyans," Interior Minister Joseph Nkaissery said.
The attackers have frequently spared Muslims while killing Christians.
One of the people killed had been a bus passenger, while the other had been aboard a truck that was also at the scene.
The bus initially had a police escort, but the police car broke down.