The company said the voluntary recall affects Totino's and Jeno's frozen pizzas with pepperoni toppings produced at the company's Wellston, Ohio, plant.
The problem was uncovered by state and federal authorities investigating 21 occurrences of E. coli-related illnesses in 10 states as of July 20, General Mills said.
About half of those who became ill were hospitalized as a result.
General Mills said an investigation "is ongoing, and the company continues to cooperate fully with all involved state and federal authorities."
E. coli 0157 can cause serious illness, including stomach cramps, diarrhea, nausea and fever. It is usually spread through contaminated food or drink.