You have a pepperoni stick sitting in your pantry that you bought a few months ago, and a half-open bag of sliced pepperoni in the fridge that has been there for a week and a half. Neither one is obviously bad. But they are two completely different products with completely different shelf lives, and most of the storage advice online treats them as the same thing.
Does pepperoni go bad?
The short answer: Yes, pepperoni goes bad, but when depends entirely on which type you have. A whole, unopened pepperoni stick can be stored in the pantry for up to 6 weeks or in the refrigerator indefinitely per USDA guidance. Once opened, refrigerate it and use within 3 weeks. Sliced pepperoni is much more perishable: use within 7 days of opening. Spoiled pepperoni smells rancid, feels slimy or sticky, or shows gray or green discoloration.
For more on storing deli meats and perishable foods, see the Food Storage Guide.

Key Takeaways

Whole stick, unopened: up to 6 weeks in the pantry; indefinitely in the fridge (USDA)
Whole stick, opened: refrigerate and use within 3 weeks (USDA FSIS)
Sliced pepperoni, unopened: use by the package date; keeps 1 week past date if stored cold
Sliced pepperoni, opened: use within 7 days
Freezer: up to 10 months for whole sticks; 1 to 2 months for sliced
Spoilage signs: slimy texture, rancid or sour smell, gray or green discoloration

Two Completely Different Products
The reason pepperoni storage is confusing is that two completely different products share the same name. Understanding which one you have changes everything about how to store it and how long it will last.

Whole pepperoni stick is a dry-cured sausage. It is made by fermenting and drying pork and beef with salt, spices, and curing agents including nitrates. The drying process removes enough moisture that the product is shelf-stable and does not require refrigeration before opening. You will find whole sticks both on unrefrigerated pantry shelves and in the refrigerated section of grocery stores. Both are the same product.
Shelf-stable sliced pepperoni bags (Hormel, Signature, and similar) are sold on unrefrigerated grocery aisle shelves: the pizza aisle, the snack aisle, the charcuterie aisle. These are vacuum-sealed to mimic the protection of an intact casing. They do not require refrigeration before opening. Once you open the bag, refrigerate and use within 21 days, per Hormel’s own FAQ guidance. Note: the strong smell when you first open a vacuum-sealed bag is normal. It is lactic acid from fermentation off-gassing. It dissipates within a minute or two and is not a spoilage sign.
Refrigerated sliced pepperoni (bags sold from the refrigerated deli section, or sliced at the deli counter) must be kept cold at all times. Use within 7 days of opening for packaged deli-section varieties; use within 3 to 5 days for counter-sliced.

How Long Does Pepperoni Last?
The USDA FSIS provides the authoritative guidance on dry sausage shelf life: hard or dry sausage like pepperon 

Author