Because some of its Gmail users’ accounts were supposedly hacked by attackers originating from China, Google has announced it may soon leave China.

In a message titled “A new approach to China” and posted on Google’s official company blog, David Drummond, the chief legal officer and senior vice president for corporate development, said the company “detected a highly sophisticated and targeted attack on our corporate infrastructure originating from China that resulted in the theft of intellectual property from Google.”

Ominously, Drummond said the search engine company has “evidence to suggest that a primary goal of the attackers was accessing the Gmail accounts of Chinese human rights activists. Based on our investigation to date we believe their attack did not achieve that objective. Only two Gmail accounts appear to have been accessed, and that activity was limited to account information (such as the date the account was created) and subject line, rather than the content of emails themselves.”

Google’s motto has always been “Don’t Be Evil” and the company is in a tough position as it balances the needs of its shareholders with its mission to ensure safe services for all its users. To this end, Drummond states: “We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.”

Google’s sudden bravado plays much more to Western audiences than to users in China. Google is not a primary search engine for Chinese users, as rival Baidu.com — which was hacked yesterday by supposed Iranian hackers — beats Google in various metrics by up to 40% more Chinese visits. Google’s departure from China may not impact many Chinese users.