TL;DR
No. An airtight container in a cool, dark cabinet beats the fridge. Temperature swings and condensation do more harm than a warm kitchen ever would.
Putting coffee in the fridge feels logical since cold storage extends the life of so many other foods. Coffee doesn't follow the same rules, because what degrades it isn't warmth so much as moisture, light, oxygen, and odors.
Every time the container comes out of the fridge, condensation forms on the beans or grounds as they warm up, and that moisture is one of the fastest ways to dull coffee's flavor.
Why the fridge backfires
Coffee is porous and absorbs surrounding odors easily, and a fridge packed with onions, leftovers, and dairy is full of them. Worse, pulling the container out repeatedly for your morning cup exposes the beans to warm, humid air each time, and that condensation cycle accelerates staling faster than just leaving coffee at room temperature would. Over a week or two of daily use, that repeated moisture exposure can leave beans tasting flat or stale well before their expected shelf life is up.
How long coffee actually stays fresh
Unopened, vacuum-sealed whole beans can last around 6-9 months past the roast date. Once opened, whole beans stay reasonably fresh for about 2-4 weeks at room temperature in an airtight container, while pre-ground coffee stales much faster, often within 1-2 weeks, because grinding exposes far more surface area to oxygen. This is also why buying whole beans and grinding just before brewing preserves flavor noticeably longer than pre-ground coffee.
Where to store it instead
An opaque, airtight container kept in a cabinet away from the stove and any other heat source is the standard recommendation. Avoid clear glass jars left out on the counter; light degrades coffee's oils over time just like heat and moisture do, gradually dulling both aroma and taste.
Freezing vs refrigerating
Freezing is different from refrigerating and can work for long-term storage if you portion the coffee into small, airtight, moisture-proof bags so you're only ever thawing what you'll use soon, ideally within a few weeks. Repeatedly freezing and thawing the same container causes the same condensation problem as a fridge, just worse, since the temperature swing is larger.
The one exception
Brewed coffee is different from beans or grounds. Once it's brewed, refrigerating it in a sealed container is fine and actually the standard advice if you're saving it for iced coffee or a same-day reheat, since the water content and lack of exposed roasted oils make brewed coffee far less sensitive to fridge moisture than beans or grounds are. Just keep it in a sealed pitcher or jar rather than an open cup, since brewed coffee left uncovered in the fridge will pick up odors almost as quickly as beans would.
Skip the fridge for coffee and use an airtight, opaque container in a cabinet instead. If you need long-term storage, portion and freeze it rather than refrigerating.