Demand for Apple's phones has plummeted in China, and the government maintains a wary attitude towards foreign technology. This is at least the CEO's second trip to the country in four months.
Apple's new research and development centre will be built by the end of the year, Cook told Vice Premier Zhang Gaoli, one of China's most senior officials, according to the official Chinese state broadcaster.
The pledge comes after the head of China's industry and technology regulator in May told Cook he hoped Apple could deepen its cooperation with the country in research and development and stressed information security.
Apple did not immediately respond to a request for comment.
Sales in Greater China, once touted as Apple's next growth engine, decreased by a third in its most recent quarterly results, after having more than doubled a year earlier.
Not only is a slowdown of the world's second-largest economy stoking concerns, but the company's stores for books and movies also went dark in China earlier this year. Apple has also lost intellectual property battles and faced anti-US sentiment from consumers.
Before Cook's charm offensive in Beijing in May, Apple announced a $1 billion deal with ride-hailing app Didi Chuxing, a move many experts saw as an attempt to curry favour with Beijing.
Other tech firms have in the past pledged investment in China while facing difficulties in the country, including Microsoft Corp and Qualcomm Inc, but often with mixed results.
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.