The first time Jeff Luhnow returned to St. Louis as general manager of the Houston Astros, he had Chinese food for his pregame meal at Busch Stadium. He opened a fortune cookie and was struck by the wisdom of the words inside: “You will obtain your goal if you maintain your course.”

Luhnow taped the slip of paper to his eyeglasses case and has looked at it every day since. The message encapsulates the convictions that have sustained him in a sometimes rocky journey from the business world to baseball.

“You don’t want to be stubborn; you want to accept new information and feedback,” Luhnow said. “But you have to have basic principles you stick to and believe in — and ignore the noise.”

The noise has followed Luhnow for almost 12 years, since the St. Louis Cardinals made him a vice president in 2003 when he had no experience in baseball. He worked eight years for the team, which is now being investigated by the F.B.I. on suspicion that it hacked into the proprietary database network he implemented for the Astros.

Law enforcement officials said they believed the act had been committed by vengeful Cardinals employees hoping to embarrass Luhnow. The attack was said to have been carried out in 2013, when the Astros were the worst team in baseball, long before their rise to first place this season. It prompts the question: What could have been so polarizing about Luhnow to inspire such a crime?

Only the hackers know for sure. Some of Luhnow’s former associates have been reluctant to speak on the record this week, citing the sensitivity of the F.B.I. case, but others sketched a portrait of a sharp, driven executive eager to bring his analytical skills to a game he had always loved.

“The minute ‘Moneyball’ came out, he read it and immediately was talking to me about, ‘This is perfect — this is what I need to do,’ ” said Steve Campo, Luhnow’s friend and roommate at the University of Pennsylvania, referring to Michael Lewis’s book about Oakland General Manager Billy Beane. “He thought he could add a lot of value.”

Luhnow, 48, was born and raised in Mexico, where his parents, who are United States citizens, ran a publishing business. He attended an American school and has dual citizenship. When an older brother claimed the Yankees as his favorite team, Luhnow chose the Los Angeles Dodgers. As a college student in 1988, he offered to buy drinks for the bar when Kirk Gibson homered to win the opener of the World Series.

His path to the majors wound its way through Philadelphia, Chicago, the Bay Area and Cincinnati. Luhnow graduated from Penn with degrees in economics and engineering, and he earned a master’s degree in business administration from the Kellogg School of Management at Northwestern. As a consultant at McKinsey & Company in Chicago, he learned skills he would apply to his overhaul of the Cardinals’ scouting operations.

“It may not be easy, or what people want to hear, but he knew you had to go where the analysis takes you,” Campo said. “You don’t make a lot of friends when you do that, but you have to work with them to figure out what’s going on. He still went where he felt it had to go, and ultimately he would bring people along.”

Luhnow and Campo worked together at PetStore.com, where Luhnow was general manager and vice president of marketing, and at Archetype Solutions in California, where Luhnow led a company that developed algorithms for custom-made clothing. On a trip to Cincinnati to pitch to investors, Luhnow reconnected with a friend, Jay Kern, whom he knew from Chicago.

That was in the summer of 2003, when “Moneyball” was captivating many major league executives. Among them was Kern’s father-in-law, William DeWitt Jr., the owner of the Cardinals, who wanted to diversify the set of skills in his front office.

DeWitt had a successful team built largely by trades for veterans. But he sought a more sustainable business model and saw in Luhnow the kinds of skills valued by Beane, who believes strongly in analytics.

“With the new labor agreement that was coming in, teams were holding on to their players,” DeWitt said in 2013. “We were opportunistic prior to that by getting players from other clubs, but we made a conscious decision back in the ’03 and ’04 time frame that we were going to throw a lot of resources and make every effort to build from within. So we had a strategy to do that. Rather than giving up draft choices, we tried to accumulate draft choices.”

Luhnow had no background in scouting, and it showed. Chuck Fick, a longtime Cardinals scout who now works for the San Francisco Giants, laughed Friday as he recalled the telltale sign: Luhnow did not even know that scouts swore by the Marriott Hotels chain. But Luhnow, Fick said, was smart enough to recognize what he needed to learn. He visited minor league affiliates and sat in on instructional meetings. He interviewed every scout, seeking input. Yet resentment was widespread.

“His skin was thick, but at first it was thin,” Fick said. “A lot of people were coming at him from different directions, and I tried to explain to him, ‘Jeff, this is not personal, you understand?’ He took things so personal at the beginning of his career, and you can’t do that or it will drive you nuts. It’s business.”

Even so, Luhnow rose within the organization, and DeWitt trusted him. Walt Jocketty was fired as general manager in 2007, just a year after leading the Cardinals to a championship. His successor, John Mozeliak, steered St. Louis to another crown in 2011, with help from players Luhnow had drafted.

By then the Cardinals had become the model organization: a midmarket behemoth with a steady pipeline of high-impact prospects who allowed the team to afford luxury items at the top of a modest payroll. The Cardinals ranked with Beane’s A’s, the Tampa Bay Rays — led by Wall Street veterans — and others among the more technologically savvy organizations.

“He brought the computer in, and everybody had to learn to adapt to what that thing was spitting out,” Fick said. “But it doesn’t have eyes, and it doesn’t have a heartbeat. It wasn’t a tell-all for him, it was a tool, and he introduced that tool to the scouting part. His strength was listening and delegating, and that’s what I learned from him — to really try to move forward with technology and use it in the proper way.”

Jim Crane, who bought the Astros in 2011, hired Luhnow on a tip from Peter Ueberroth, the former commissioner, who knew Luhnow through a family connection. Ueberroth told Crane of Luhnow’s background, and Crane, who made a fortune in the freight business, was intrigued.

“Kind of a hidden gem in baseball,” Crane said in a 2012 interview, recalling Ueberroth’s pitch. “He had a lot of processes and systems that I was accustomed to, running a big international company.”

Luhnow pledged to Crane to overhaul an organization that had just lost 106 games and would lose even more in each of the next two seasons. He changed everything, from personnel to décor.

His pro scouting director, Kevin Goldstein, came from Baseball Prospectus. Sig Mejdal, hired for the new position of decision sciences director, came from the Cardinals — and, before that, from NASA. Luhnow also had no use for the depth charts of the 30 major league teams that had covered the walls of his office when he arrived.

“One of the first things I did was ask them to take it out,” he said, a few months after taking the job. “Depth charts are something that I can get online at the stroke of a button.”

The Astros have drafted well under Luhnow, but not perfectly. With the first pick in the 2013 draft, they took Mark Appel, now pitching at Class AA, just ahead of Kris Bryant, now a feared slugger for the Chicago Cubs. Last spring they released J. D. Martinez, who quickly became a reliable run producer for Detroit. Last winter they lost Delino DeShields in the Rule 5 draft, which involves professional players, to Texas, where he has become a useful outfielder.

But the Astros have also stuck to their beliefs, even if some seem unusual. They employed the most defensive shifts in the majors last season, and have a lineup that shows their commitment to statistical extremes: The Astros lead the American League in strikeouts, home runs and stolen bases.

They also lead the A.L. in victories, with 40 through Thursday. That total is surpassed by only one other team in the majors: the Cardinals. It is much too early to imagine a World Series between Luhnow’s former and current teams, and while the Astros’ database could surely venture a guess, its architect, naturally, will keep that information private.

“If there’s one thing I’ve learned in baseball, it’s that this is a humbling game,” Luhnow said. “I remain as motivated as ever and as nervous as ever — and that nervousness and motivation drives us to continue to get better.”

A version of this article appears in print on , on Page D2 of the New York edition with the headline: Astros’ G.M. Delegates With a Drive for Data . Order Reprints | Today’s Paper | Subscribe