Barra, under whom Xiaomi was for a time China's best-selling brand, described his experience as a "spectacular" journey but said it was time to return home for a "new adventure". He did not elaborate.
"But what I've realized is that the last few years of living in such a singular environment have taken a huge toll on my life and started affecting my health," he said in a message on Facebook, without giving details.
"My friends, what I consider to be my home, and my life are back in Silicon Valley, which is also much closer to my family," he said.
Barra said Xiaomi was now well placed to continue its international expansion.
Also Read
The firm, created in 2010, was little known outside China when it recruited Barra to run its international activities.
The highly publicised recruitment marked the beginning of its dramatic transformation into an industrial giant. It briefly held the top slot for smartphone sales in China, far ahead of Apple and South Korea's Samsung.
Despite his efforts, Xiaomi still depends on the Chinese market for the overwhelming majority of its sales.
But it faces strong domestic competition - including newcomers Oppo and Vivo - in the low-cost smartphone niche, and its market share continues to decline.
In the third quarter of 2016, Xiaomi was fourth with 8.7 of the Chinese market compared to 16 per cent a year earlier.
This was far behind Oppo and Vivo (about 17 per cent each) and China's Huawei (15.7 per cent), but just ahead of Apple and Samsung, according to IDC.
Disclaimer: No Business Standard Journalist was involved in creation of this content