Apple Inc. said Monday that it is investigating a case in which the family of a 23-year-old woman alleges that she was electrocuted by her iPhone.

Though details about the case remain sketchy, it has caught the imagination of social media users in China, who have been spreading word about the case and warning not to use devices while they are charging.

According...