Wall Street is facing an "incredibly disturbing" trend.

Students at business schools who think of themselves as "highly ethical" aren't interested in a career on Wall Street. They don't see the big banks as moral enough for their standards.

That's according to William Dudley, the president of the New York Federal Reserve. Dudley knows a thing or two about ethics at big banks. He used to work at Goldman Sachs and now Dudley leads one of the watchdogs in charge of overseeing Wall Street's activities.

Dudley was bothered by a recent conversation with business school deans. They told him that business school students who consider themselves "highly ethical" are choosing not to work in financial services.

"As long as we have that self selection out of the financial industry by people who view themselves as highly ethical...that tells you we have a problem," Dudley said at the Economic Club of New York Thursday.

Fewer business school students jump to Wall Street

Although he didn't name any schools or cite specific research, the overall numbers at business schools highlight the same trend.

Over half of Columbia Business School's 2007 graduates went into financial services. But only 35% went into financial services in 2014, according to the school's statistics.

The trend was similar at the University of Pennsylvania's Wharton School. Nearly half of all Wharton MBA graduates went to Wall Street in 2007, but that fell to just 37% this year.

Related: Women with MBAs increasingly choose Google over Goldman

More students are flocking to Silicon Valley

At the same time some business graduates are cooling on Wall Street, they're warming up to Silicon Valley. There's been a significant increase in business school graduates flocking to the hottest tech firms, like Google (GOOG), Apple (AAPL) and Facebook (FB).

At Wharton, 14% of last year's graduates went into tech, up from just 6% five years ago. The number of MBA graduates at Harvard who went to work in tech has doubled in the last five years too.

Related: America's 10 most expensive colleges

More business school graduates still go into financial services than tech, but the gap is narrowing.

Some say the shift away from Wall Street is less about ethics and more about the perception that it's an old industry shackled by a slew of new regulations. That image might deter some business grads.

On the other hand, tech firms are younger, faster growing, pay well and generally offer less strenuous hours. They're also far less regulated than financial services.

"I don't think it's ethics on that. It's the glamour," says Kate Warne, an investment strategist at Edward Jones and a business school professor at Washington University in St. Louis. "It's that perception of 'financial services isn't the place where I'll have a great career and make a lot of money and feel that I'm a part of the future.'"