SHANGHAI—U.S. cosmetics company Mary Kay Inc. is in talks to buy an office building in Shanghai as part of its expansion plans in China, bucking the trend in a country where rivals have eased back.

The Texas-based direct-sales beauty company said in an emailed statement that it is in negotiations to buy the Point Jingan, an 11-story building in Shanghai's central Jing An District. The price could total 820 million yuan ($135 million),...