The attack occurred in Malleley near the border town of Liboi when "heavily armed men stormed a mosque and shot at people indiscriminately," a police officer in the town of Garissa said.
"Five men and two women have been killed in the attack, while two others have been injured," Garissa county commissioner Maalim Mohammed told AFP.
"The two women had responded to the screams from the mosque when they were shot," he said, adding there were about ten attackers.
The attacks are regularly blamed on Somalia's Shebab insurgents or their sympathisers, who vowed revenge after Kenya invaded southern Somalia in late 2011 to attack the Islamists' bases there.
In December, a blast near a mosque in the Kenyan capital Nairobi killed five people.