NEW DELHI–Amazon.com Inc. founder Jeff Bezos, perturbed by his company’s failure to capture much of the massive Chinese market, had a pointed message for executives in India during a visit in 2014: Don’t let that happen here.

Do what it takes to succeed and don’t worry about the cost, Mr. Bezos said, according to a person who was present.

Amazon,...