Walmart Inc. said the chief executive of Flipkart Group, its Indian e-commerce business, resigned following an independent investigation into a personal misconduct allegation.

Binny Bansal, one of the co-founders of Bangalore-based Flipkart, decided to step down after “recent events risked becoming a distraction,” Walmart said Tuesday.

Walmart opened an investigation this summer after a former Flipkart employee came forward alleging Mr. Bansal had sexually assaulted her sometime around 2016, according to a person familiar with the matter.

During the negotiations this year to sell Flipkart to Walmart, Mr. Bansal didn’t disclose the allegation against him or that he had hired security personnel to privately deal with the matter, the person said.

As part of the investigation, Mr. Bansal told Walmart he had a consensual relationship with the woman and denied he assaulted her, the person said.