PepsiCo Inc.’s longtime leader, Indra Nooyi, will step aside as chief executive this year, handing the future of the soda-and-snacks company to one of her lieutenants at a time when shifting consumer tastes are roiling its markets.

Ms. Nooyi, 62 years old, steered the maker of Mountain Dew, Gatorade and Doritos chips for a dozen years through the changing landscape, defeating an activist investor’s attempt to break up the company. She pushed PepsiCo far beyond its cola roots, expanding with mixed results into hummus, kombucha...