But the company gave no assurance that it would not get involved in similar projects in the future, The Intercept reported.
The company said it would work on Maven until the end of 2019, but the 18-month-old contract would not be renewed.
The announcement was made by Google's cloud chief Diane Greene, at a Friday morning all-hands briefing known internally as the weather report".
GOOGLE MOTTOS: A HISTORY— MGK Hockey 1234 (@mightygodking) 28 March 2018
1999: Don't Be Evil
2003: Try Your Hardest To Not Be Evil
2008: Make A Reasonable Effort To Avoid Being Evil
2013: What Is Evil, Really, When You Get Down To It, I Mean Really
2018: *just a series of high-pitched giggles*
The company got involved in the Maven project due to its close connections with the Defence Innovation Board through Eric Schmidt, the former chairman of its parent company, Alphabet.
Schmidt was appointed as chairman of the Board in March 2016.
Last week, leaked emails from Google showed that Project Maven would have earned the company up to US$250 million a year, much above the US$15 million figure that was initially made public.
A month after news of the project became public, the Pentagon provided another US$100 million towards the program.
Staff at Google had expressed disquiet over the company's involvement in the project. More than 3000 staff signed a letter submitted to senior management to protest against the decision to get involved in Maven.
In May, a dozen workers quit Google, expressing concern over the use of AI in drone warfare and the company's political decisions and the degree to which the trust of users would be eroded by this decision.