The news comes as a surprise as the firm had previously indicated version 4.4 of the OS would be Key Lime Pie.
The decision to brand the software with the name of Nestle's chocolate bar is likely to be seen as a marketing coup for the Swiss food and beverage maker.
However, Google told the BBC that it had come up with the idea and that neither side was paying the other.
"This is not a money-changing-hands kind of deal," John Lagerling, director of Android global partnerships, told the BBC.
Instead, he said, the idea was to do something "fun and unexpected".
However, one branding expert warned there were potential pitfalls to such a deal.
"If your brand is hooked up with another, you inevitably become associated with that other brand, for good or ill," said Simon Myers, a partner at the consultancy Prophet.
"If that brand or business has some reputational issues that emerge, it would be naive to think as a brand owner that your good name, your brand equity, would not be affected."
Nestle has faced criticism in the past for the way it promoted powdered baby milk in the developing world. It has also had to recall numerous products, most recently bags of dog food following a salmonella scare in the US.
Google has also attracted controversy of its own, including a recent report from the US government suggesting that Android attracts more malware attacks than any other mobile OS.
Google also announced that it has now recorded the system being activated on a smartphone or other device more than one billion times.
Since 2009, Google and its partners in the Open Handset Alliance have codenamed each Android release after a type of treat, with major updates progressing a letter along the alphabet.
Previous versions have been called Cupcake, Donut, Eclair, Froyo (short for frozen yoghurt), Gingerbread, Honeycomb, Ice Cream Sandwich and Jelly Bean.
Although the developers had referred to the forthcoming version as KLP in internal documents, Mr Lagerling said the team decided late last year to opt instead for the chocolate bar.
"We realised that very few people actually know the taste of a key lime pie," he explained.
"One of the snacks that we keep in our kitchen for late-night coding are KitKats. And someone said: 'Hey, why don't we call the release KitKat?'
"We didn't even know which company controlled the name, and we thought that [the choice] would be difficult. But then we thought well why not, and we decided to reach out to the Nestle folks."
Mr Lagerling said he had made a "cold call" to the switchboard of Nestle's UK advertising agency at the end of November to propose the tie-up.
The next day, the Swiss firm invited him to take part in a conference call. Nestle confirmed the deal just 24 hours later.
"Very frankly, we decided within an hour to say let's do it," Patrice Bula, Nestle's marketing chief told the BBC.
Mr Bula acknowledges there were risks involved - for example, if the new OS proved to be crash-prone or particularly vulnerable to malware it could cause collateral damage to KitKat's brand.
"Maybe I'll be fired," he joked.
"When you try to lead a new way of communicating and profiling a brand you always have a higher risk than doing something much more traditional.
"You can go round the swimming pool 10 times wondering if the water is cold or hot or you say: 'Let's jump.'"
Executives from the two firms met face to face at a secret event held at Mobile World Congress in Barcelona in February to finalise the details.
To promote the alliance, Nestle now plans to deliver more than 50 million chocolate bars featuring the Android mascot to shops in 19 markets, including the UK, US, Brazil, India, Japan and Russia.
The packaging had to be produced in advance over the past two months. But despite the scale of the operation, the two firms managed to keep the story a secret,
"Keeping it confidential was paramount to Google's strategy," acknowledges Mr Bula. "Absolutely nothing leaked."
The Android team also took steps to preserve the element of surprise, notifying only a "tight team" about the decision.
"We kept calling the name Key Lime Pie internally and even when we referred to it with partners," revealed Mr Lagerling.
"If we had said, 'The K release is, by the way, secret', then people would have racked their minds trying to work out what it was going to be."
Most Google employees will have learned of the news only when a statue of the Android mascot made out of KitKats was unveiled at the firm's Mountain View, California, campus.
"A lot of things, especially in tech nowadays, become public before they are officially supposed to be," said Mr Lagerling.
"I think it's going to a big surprise for a lot of people, including Googlers."
By Leo Kelion Technology reporter