FORTUNE — Sshh! Don’t look suspicious. Keep your head down. We’re on our way to a really secret organization in suburban Virginia just outside Washington, D.C. As we drive along Dolley Madison Boulevard, don’t bother looking at the razor wire, tall gates, and armed guards on the right. Everybody knows that’s CIA headquarters — there’s a marked sign out front (and a gift shop inside, at least for employees). No, we’re going a couple more miles and hanging a left until we reach a squat, rust-colored two-story building with meager windows, a PRIVATE PROPERTY sign, no identification, and all the character of a brick storage shed. The front door is locked. Some locals have called the place the Kremlin. In the upstairs reception area, you’ll see half-a-dozen portraits of the owners and their relatives. Admire them if you like, but taking photos of the portraits is strictly prohibited.
MORE: The 100 Best Companies to Work for
More from FORTUNE
Welcome to the astonishingly modest world headquarters of Mars, the third-largest private company in the U.S. (behind Cargill and Koch Industries). With about $33 billion in global revenue last year — we talked it out of them — Mars would be in the top 100 of the Fortune 500, ahead of McDonald’s MCD , Starbucks SBUX , and General Mills GIS . It employs 72,000 people, more than a third of them in America. (Only about 80 work in the McLean, Va., headquarters; it’s so small that when the chairman of Nestlé once paid a visit, he thought he was in the wrong location.) Its diversified galaxy of brands for man and beast are iconic — from chocolate favorites like M&M’s and Snickers to Wrigley’s Juicy Fruit and Lifesavers to pet-care products like Pedigree and Whiskas, as well as Uncle Ben’s Converted Rice. The company says it does 200 million consumer transactions a day. But despite that reach across civilization and into customer pockets, Mars is among the most secretive, insular, and little understood multinational companies around.
It is still 100% family-owned — now by the three elderly offspring of Forrest Mars Sr., who launched Mars onto its trajectory as a confectionery colossus after taking over the business from his father, Franklin C. Mars, who died in 1934. That family is either extraordinarily private or weirdly reclusive, depending on whom you ask, though asking them isn’t an option, since the last time any family members gave an interview was during the administration of Bush 41. The three owners are all multibillionaires — each is reportedly among the 20 or so richest Americans. Ask employees — while officially called “associates,” they sometimes refer to themselves as Martians — about a member of the Mars family, and you’re about as likely to get a revealing answer as if you’d asked about the proprietary process in which they stamp “m” on the little colored candies. The shortest time interval in the Martian universe is that between when you ask about a Mars family member and when someone on the astronomically high-strung public-relations team snaps to attention and rules the question out of order. Mars can make Willy Wonka’s workplace appear downright normal.
What becomes striking is that Mars is in fact a sweet company at which to be an employee. For the first time, the company has made it onto Fortune’s annual U.S. roster of the 100 Best Companies to Work For. At No. 95 on the 2013 list, Mars boasts employees who love not only the products they make but also the office culture and the company’s long-standing principles. That might seem surprising on the face of it. After all, punching in every day at most Mars sites — the president has to do it too — can seem anachronistic, even if the time clock is now a digital screen; if you’re late, you get docked 10% of your pay. While compensation is very good in comparison with that of competitors, Mars offers neither stock options nor company-driven pensions. Its work sites are utilitarian rather than comfy. There are no Foosball tables or sushi chefs. “A lot of really good companies invest in the wrong architecture,” says Paul S. Michaels, the nonfamily president of Mars. “Does it add value for the consumer [for] Snickers bars to pay for marble floors and Picassos?”
And yet employees thrive. Once they get a job, they stay: Turnover in the U.S. is a low 5% or so (excluding the sales force). Some families can claim three generations of employees. The 78-year-old woman who runs the in-house candy shop at the plant in Slough, England, has loyally worked at Mars since the reign of George VI — more than six decades. The demographics of the Mars workplace in the U.S. — about 70% of it in manufacturing, almost entirely nonunionized — are diverse; women constitute 38% of the managers. There are even some unusual perks, like every kid’s fantasy come to life: vending machines that dispense free candy all day long. Chewing gum at meetings is encouraged (as long as it’s Wrigley’s).
Perhaps most significant, employees have great latitude for advancement, both within their divisions and in the larger Mars ecosystem; if you’ve had enough of Skittles brand management, you might find satisfaction in quality control of Cesar Canine Cuisine Sunrise Breakfast (“with smoked bacon & eggs in meaty juices”!). The company prizes the idea of developing cross-division talent — and fortunately, nobody confuses Starbursts with Little Champions Butcher’s Stew. Consider Jim Price, who’s now the site-quality and food-safety manager at the chocolate plant in Hackettstown, N.J. Almost 27 years ago he began his Mars career as a janitor in a boutique chocolate operation in Henderson, Nev. His supervisor urged him to attend community college at night; Mars paid for tuition and books. If “you ask some companies for their mission statement, they have to pull it out of a drawer,” he says. “Here you just have to look around.” Such a story reflects corporate decency — and shrewdness.
VIDEO: Watch how Mars makes M&Ms
The irony of the company’s very privateness, employees stress, is that it turns out to be a boon. Because there’s a resolute lack of interest in the public markets — which Mars says would subject it to the vicissitudes of shareholder whim and the tyranny of earnings reports — employees have autonomy to experiment with ideas and management has the patience to train. It doesn’t work that way elsewhere. Employees won’t cite competitors by name, but the big ones — Hershey’s HSY , Nestlé NSRGF , Mondelez MDLZ — are all publicly traded. “I get the benefit of a longer learning cycle,” says Osher Hoberman, U.S. director for Snickers and Twix, who works in Hackettstown, the home of Mars Chocolate North America.
Many Martians get a mentor — even the executives, some of whom go through a “reverse internship” in which a younger employee introduces them to social media. “This is probably the only company in which I was told, ‘You’re not investing enough in your brand,’ ” says Debra Sandler, president of the chocolate division, who previously worked at two public companies, Johnson & Johnson JNJ and PepsiCo. PEP They also have the luxury of catering to the whims of the owners: Every Christmas season, the factory churns out a few hundred tubs of private-stock Dove Peppermint Bark ice cream. It’s just for the family. (We tried some. We want more.)
And Mars continues to grow, if incrementally. Late this year it will open its first new chocolate plant in the U.S. since the mid-1970s; on what used to be cornfields, the $250 million Topeka facility will create 200 full-time jobs. Within its various offices, Mars is shockingly transparent. When Fortune isn’t visiting, the company displays on big flat-screens its current financials: sales, earnings, cash flow, factory efficiency. The data disclosure is designed to motivate employees whose bonuses are based on the performance of their respective divisions. Many employees — the company won’t specify a number — get bonuses from 10% to 100% of their salaries if their team has performed well financially; the higher your rank, the more you have to gain.
Outside the office, Mars encourages community involvement through two initiatives: Mars Volunteers and Mars Ambassadors. The first offers paid time off to clean parks, aid medical clinics, and plant gardens; in 2011, 9,600 employees volunteered 37,000 hours at 290 organizations. The second, a highly competitive program, allows a select few — 80 in 2011 — to spend up to six weeks working with Mars-related partners in remote areas; for example, six employees spent a week in Ghana with growers of cocoa beans.
Now in its 102nd year, Mars is taking baby steps toward corporate glasnost. In an online video apparently aimed at both potential recruits and us, a few family members actually speak. “Associates … you are valued for you,” declares Victoria Mars, a great-granddaughter of founder Frank Mars and the company ombudsman. But the 61-year-old Michaels makes clear that openness goes only so far at the moment. He won’t tell you who’s on his board of directors or its size or even if the board has a chairman. (In fact, according to a regulatory filing for 2011 in the State of Delaware, where Mars is incorporated, there are six members, all grandchildren or great-grandchildren of Frank Mars. One is Victoria Mars.)
Until sitting down with Fortune shortly before Christmas, Michaels hadn’t agreed to an interview since 2008 — which is rather a shame, as he’s altogether charming and witty. He talks proudly of his own 10-year-old daughter, who isn’t supposed to bring home non-Mars goodies on Halloween; but she outsmarts him, successfully arguing she’s “just doing testing.” One time when he went to Canada on business, a border agent inquired about the purpose of his meeting. “Global chocolate domination,” he replied. They still let him in.
MORE: ‘How I found my job at a Best Company’
Mars’s decision to let us peek inside is part of a conscious, self-described “campaign to build a more visible employer brand.” The company has always said its people don’t talk much because it is the brands that are the stars. “I’m not from the Jack Welch school of heroic CEOs,” says Michaels, who’s seated at his bare open-office desk at headquarters in McLean, bounded by oversize stuffed M&M characters (yes, those you can take pictures of ). But in an age of web-driven openness, as well as increasing interest among consumers about who makes what they buy, Michaels acknowledges his company may have to modify its ways. “It’s about recruiting new people and retaining talent,” Michaels says. “We have to change.” At least a little.
Much as religions worship their tablets, the company believes in the “Five Principles of Mars”: quality, responsibility, mutuality, efficiency, freedom. The principles are emblazoned on the walls of its 400 offices and manufacturing sites in 73 countries, including such faraway lands as China, Madagascar, and Saudi Arabia. At, say, pet-care headquarters, the first thing you see on walking in is floor-to-ceiling wall art featuring carefree golden retrievers frolicking in a field — and above them each of the Five Principles. Some conference rooms bear the name of a principle, as in: “Meet me at five in Mutuality.” The principles are what unify Mars employees across products and geography. “A very important tenet of Mars is we don’t want to be a holding company of different companies,” says Martin Radvan, the president of Wrigley, who took over the division in 2011 after 24 years in other Mars positions. “At the end of the day, I think there’s a strong feeling we’re all Martians.”
Every Mars employee gets a glossy 27-page booklet explaining the principles in action, signed with the names of 13 family members. The principles, righteously explains the booklet, “set us apart from others, requiring that we think and act differently towards our associates, our brands and our business.” For example, according to the Mars credo, the freedom principle undergirds all that makes the company exceptional. Freedom means being financially answerable to no one. And for freedom to flourish, the family is requisite: “Many other companies began as Mars did, but as they grew larger and required new sources of funds, they sold stocks or incurred restrictive debt to fuel their business … We believe growth and prosperity can be achieved another way.”
Employees can, and do, recite the Five Principles as if they were handed down from the managerial heavens. They’re cult as much as culture, but “they don’t tattoo ’em on us or anything like that,” says Will Turnipseed, a commercial sourcing manager in the pet-care division. While the principles weren’t codified until 1983, they date to the early days of Mars. The company has always viewed itself as a paragon of rectitude, initially prospering in the depths of the Depression. The products had to be perfect, no matter the cost: fresh, uniform, unblemished. Ingredients weren’t fudged. How Mars got its DNA — an innovative management philosophy combined with familial eccentricity — is the story of an American original.
A childhood victim of polio, Frank Mars spent much time in his house in Tacoma. His mother entertained him in the kitchen, where he learned the art of candymaking. By his late twenties, he had turned making butter creams into a business, Mar-O-Bar. His ambitious son, Forrest Mars Sr., with a degree in industrial engineering from Yale, then helped expand the company nationally. Together, in 1923, the Marses came up with the nougat-laced Milky Way. It was an ingenious creation because it was both cheaper and bigger than a regular chocolate bar made by, say, Hershey’s. Milky Way’s cousin — the Snickers bar, named after a favorite family horse — followed seven years later.
By 1933, Mars was taking in $25 million annually, but father and son couldn’t get along. Forrest Sr. departed for Europe, with $50,000 and the Milky Way recipe from his father. He was a natural entrepreneur. After working in the Swiss chocolate factories of Henri Nestlé and Jean Tobler, Forrest Sr. developed the Mars bar — pretty much an even sweeter Milky Way — and in England he pioneered the notion of food for pets. Along the way — when he saw what soldiers were eating in the Spanish Civil War in the late 1930s — he discovered a tiny treat of chocolate pellets encased in candy shells.
MORE: 10 Top-paying companies
Thus was born the idea for M&M’s. The “M’s” were Forrest and R. Bruce Murrie — a son of the president of competitor Hershey’s, which Mars asked to supply the chocolate because of limited cocoa availability during World War II. M&M “plain chocolate candies,” in four colors, began selling in 1941, becoming the most popular candy in America. After his father’s death at 50, Forrest Sr. eventually returned to the U.S. and finally in the 1960s merged both parts of the business after warring for decades with heirs of his father and other investors.
As the Mars business burgeoned over the years, its culture was also taking hold. Forrest Sr. eliminated private offices and divisive trappings like the chauffeured $20,000 Duesenberg. He installed those time clocks. And he boosted salaries. At the same time, he became known as an austere, ruthless boss who believed that management consisted of “applying mathematics to economic problems.”
His devotion to his brands was passion or fixation — it depended on whether you were the one on the receiving end of a tirade over an improperly stamped M&M. He reportedly liked to humiliate one executive by writing FAILED on his memos and displaying them in the bathroom. After assuming full control of the company, on an early visit to the chocolate plant in Chicago, Forrest Sr. sank to his knees and proclaimed to his employees, “I’m a religious man. I pray for Milky Way. I pray for Snickers.” His own kids didn’t get allowances — or free candy. But despite his ways, or perhaps because of them, the workforce at some level appreciated his commitment, along with the ample pay, lack of hierarchy, and opportunity for professional development. While the boss wasn’t beloved, he was accessible and deeply respected.
In 1973, with annual corporate revenue at about $1 billion, Forrest Sr. turned control of the business over to his two sons, Forrest Jr. and John, who — like their father — were both Yalies who went overseas to learn the ropes. Like their father as well, according to press accounts, they were harsh. (Mars declined to make any family members available. Forrest Jr. is now 81; John, 77.) They even clashed with each other. “This company doesn’t need McKinsey as much as it does Freud,”
Fortune suggested in 1995
. One of the great “oops” moments in product-placement history happened on the sons’ watch: In 1982, Mars passed on the chance to have E.T. lured out of the forest by the M&M’s of a young boy named Elliott. Mars thought the creature too scary. The movie used Reese’s Pieces instead and gave Hershey’s a marketing coup. When the movie was remastered in an anniversary edition, Michaels briefly looked into whether M&M’s could be substituted into E.T. No luck.
Forrest Sr. died in 1999, but not before inspiring in his hardworking sons their own peculiarities. According to various press accounts, employees were prohibited from even mentioning the father in the presence of the sons. Such was the psychodramatic legacy of being raised to inherit a chocolate kingdom from a father with impossible expectations. The sons were famously frugal: One story had it that John slept in the parking lot in his Winnebago when inspecting a plant. Among the sons’ strategic contributions was to focus on global expansion, like into Russia. They also in 1979 were among the first to persuade merchants to put candy displays near cash registers, the better to generate impulse purchases.
Today Mars has 11 billion-dollar brands (see graphic). Snickers and M&M’s are the most popular candies in the world, and in the U.S., Mars’s chocolate business is eclipsed only by Hershey’s. Almost every dollar of profit gets reinvested in the company. Each Mars division functions with vast independence — subject to the core principles. When Chicago-based Wrigley was acquired by Mars in 2008, the storied 117-year-old chewing-gum manufacturer had to gut its interior offices to change to Mars’s open-floor plan; such is the value of approachability and communication that is presumed to go along with an egalitarian workspace.
Forrest Jr. and John retired as Mars co-presidents in 1991 and 2001, respectively, setting the stage for different nonfamily members to run the company day to day. In 2004, Michaels became president — he gets no CEO title — after 11 years as an executive at the company and prior stints at Procter & Gamble PG and Johnson & Johnson. The Mars family members are intimately involved with the business. “The owners have a lot of sweat equity in the company,” Michaels says. “So when they give you advice or feel strongly, they have a level of credibility.” He says he hears from Mars family members “a lot,” which seems to mean several times a week. Employees on the line say that when they get a call out of the blue from the family, they’re more tickled than threatened.
MORE: 10 top perks
During Michaels’s tenure as president, Mars revenue has doubled (in part because of the Wrigley purchase, which was partly funded by Warren Buffett’s Berkshire Hathaway brk.a ). Adweek credits him with driving Mars’s “creative renaissance” in advertising, like the commercial for Snickers Peanut Butter Squared featuring man-eating sharks. He’s also probably had a role in loosening things up a bit after the regime of the two Mars sons. Michaels concedes the incongruity between his company’s enigmatic privateness and its immense public footprint in a consumer business. “We’re not making nuclear weapons,” he says. “This is a company you’re not embarrassed to tell people you work for.” And this is the first time he’s comfortable saying so since 2008? On the topic of being interviewed, he tap dances as well as any ambivalent corporate leader can in his position. “Think of it as a journey. This is a big step for us.”
In the Musconetcong River Valley of northwestern New Jersey, in the old village of Hackettstown, is Mars’s second-largest candy plant, along with the executive offices for Mars Chocolate North America (the largest is in Cleveland, Tenn.). Out front of the low, 500,000-square-foot building are four enormous leggy M&M characters — green and brown on the roof, red and yellow on the sides. Their plasticized celebrity is what passes for Mars corporate pizzazz.
It’s here in Hackettstown, along Chocolate Avenue, that employees make, by our count, about 192 million M&M’s in 25 colors — every eight hours. That’s about half of all M&M’s made in the U.S. Although the process is mostly automated — from the swirling and molding to dozens of sequential coatings and “m” printings — it’s still time-consuming: From cocoa and sugar to package and box, an M&M takes a day to make, with half the time spent in the special coating process that creates the hard shell that, of course, means M&M’s “melt in your mouth, not in your hands.” About 2% are rejected for quality. If the winds are blowing right, the students at Centenary College a mile south can smell the cocoa cooking; on a good day they can catch a whiff of peanuts roasting too. At the plant, some unnamed employees are known to eat 1½ pounds of free M&M’s a day.
Built in 1958, the plant and the chocolate command center next door together employ 1,230 today. Despite the location in the wilds of New Jersey, the employees — relentlessly earnest all — seem to adore coming to work. Upon interrogation, they’ll even share why. “My kids jumped for joy when I told them ‘Mom’s working for M&M’s!’ ” recalls Jennifer Mahoney, who does supply planning. “We’re working on really cool five-year plans,” says Rima Sawaya, the brand manager for 3 Musketeers. “We had a temporary richer chocolate taste, and now we’ve gone back to the original formula!”
Twenty of the employees like it so much that they make the 114-mile daily commute from the Upper West Side of Manhattan — part of an informal carpool. It’s not exactly the free, Wi-Fi-enabled, eco-harmonious shuttle service that Google GOOG provides in Silicon Valley. But in return for their dedication to keeping the world safe and prosperous for chocolate, they get a precious front-row CARPOOLERS ONLY spot in the sprawling Hackettstown parking lot. With a sweetener like that, it’s no wonder that Mars can surely be a great place to work.
–Research associate: Marilyn Adamo
This story is from the February 4, 2013 issue of Fortune.