Cameron has been staying with the monarch at her private Balmoral estate in Scotland -- an invitation traditionally offered to the prime minister's family in September.
Cameron wrote in his Twitter account: "I'm cutting short a visit to Balmoral to return to Downing St to chair Cobra late this afternoon, dealing with the Kenya terror attacks."
Cobra is the UK government's emergency response committee.
UK Defence Secretary Philip Hammond said next of kin had been informed and that the UK "stands ready" to provide more assistance to Kenya.
More From This Section
Hammond chaired a meeting of Cobra this morning.
This was the third meeting of the group about the attack on the Westgate shopping centre in Nairobi.
Around 10 attackers and some 30 hostages are still thought to be holed up inside as Kenyan security forces, including commando teams and military helicopters, launched a "final assault".
The UK Foreign Office said it expects the number of British fatalities to rise.
Cameron, who has warned the UK to be braced for "more bad news", called the attack "an absolutely sickening and despicable attack of appalling brutality".