The good ship Alex. Brown & Sons, which has been plying the trading routes of the world for 190 years, will have a new captain soon. The man who has been steering the ship for the past seven years, President Donald B. Hebb Jr., has decided to relinquish the helm and go below and help stoke the boilers.

Hebb's decision was a surprise to many of his fellow sailors at the Port of Baltimore, where the company has been berthed since Alexander Brown opened his trading and shipping business in 1800.

Seven generations later, Brown's descendants are still running the firm and still flying the red-and-white flag that marked the company's ships as they hauled agricultural products to Europe and returned to the states with Irish linens.

Once dependent on a retail stock and bond business, Alex. Brown & Sons became a major force in investment banking during the 1980s. Indeed, much the firm's success in that field is credited to Hebb, who joined Alex. Brown as an investment banker after graduating from Harvard Business School in 1970. He went on to become president of the firm in 1984.

When Hebb quit last week, his formal statement said that "increasingly my interests lie with serving the firm's clients more directly."

In an interview, Hebb said he had decided some time ago that he would serve as president for as long as he felt he was contributing to the progress of the company. But eventually he planned to move to some other job in the firm. Now, he said, the time had come.

"It's clear that I don't want to continue," he said.

But it wasn't easy to get him to explain why this was the time he had chosen.

When Hebb was pressed as to whether his departure was related to Alex. Brown's recent trading losses and several disasters with new stock issues, Hebb declared that those episodes were "completely irrelevant."

Finally, when Hebb was asked bluntly if was leaving of his own volition or was being pushed, he said, "If I was 65, you wouldn't be asking that question."

And that was probably true. It is no surprise when a man of 65 says he is stepping down from a stressful job. But it's a lot more surprising when a man of 48, Hebb's age, says he is moving on.

Usually, executives of Hebb's age and level don't leave their jobs voluntarily to take a lesser job. What also raises the level of skepticism, perhaps unfairly in Hebb's case, is that so many other brokerage firms are experiencing bear market shakeups.

Hebb, however, sounds like a man who, after seven years of steering his ship through treacherous waters, and despite a salary of almost $1 million a year, asked himself, "Why do I want to keep doing this? Wouldn't it be more fun for me to be out doing deals?"

Hebb wouldn't be the first weary executive to say to himself, "I'm tired of trying to motivate all these people. I'm tired of all the complaints. And I'm tired of taking the heat for everyone else's mistakes. So, I'm out of here."

During the past few years, both Hebb and his firm have been subject to a variety of pressures.

To begin with, Alex. Brown used to be a traditional private partnership. Because of demands for more capital, Alex. Brown sold stock to the public in 1986.

Partnerships and public companies are very different creatures. In the old partnerships, every partner took a keen interest in the firm's activities, especially in its trading, because the partners' capital was at risk. In public companies, it is the stockholders money that is at risk.

By all accounts, while Alex. Brown is a public company, it still behaves very much like a partnership, with a management that is devoted to consensus, orderly change and protecting the image of the company. Getting used to life in a fishbowl has not been easy for folks at Alex. Brown.

A student of Alex. Brown might have deduced that changes were afoot by noticing that Hebb was listed as president and chief executive officer in March 1990 but only as president when he resigned last week. Earlier this year, for reasons that are not entirely clear, the jobs of Hebb, chairman Benjamin H. Griswold IV and chief operating officer A.B. Krongard evolved into a three-person leadership committee.

A committee of the board of directors will search for a new president from either inside or outside the firm.

The new president, like Hebb, will be responsible for strategic planning. Some observers hope that the new president will be able to do what Hebb apparently could no longer do -- provide fresh perspective on the future, get the company back to basics, better balance the demands of the retail and investment banking divisions and provide a more personal touch that will inspire employees to survive in a tough bear market.

Hebb's return to the investment banking arena will come at a time when the once-lofty reputation of the firm's capital-raising operation has been sullied by several incidents.

Perhaps the worst recent episode involved a company called In-Store Advertising, Inc., which Alex. Brown took public in July at $19 a share. The stock is now trading at about $2.50.

If that wasn't embarrassing enough, Alex. Brown it also has been revealed that Alex. Brown sold a large block of In-Store Advertising stock to a customer who later decided to sell it back. Alex. Brown bought back the stock and was about to resell it to a second customer when the firm learned that In-Store Advertising would issue a bad earnings report.

Rather than letting the new customer get stuck with a falling stock, Alex. Brown kept the shares and took a loss of several million dollars.

"We got caught in mid-trade," Hebb said.

The losses suffered by other customers who bought In-Store Advertising shares also produced three class action lawsuits against Alex. Brown. The suits are pending in New York courts.

The suits allege that the offering circular omitted material facts about In-Store's revenues and earnings. And Alex. Brown, in turn, has told In-Store that if the brokerage firm suffers a loss from the suits, it will sue In-Store for the money.

Hebb says that despite the best efforts of the investment bankers when they study potential underwriting deals, "You don't get them all right."

To which, stockholders of Alex. Brown might reply, "Well, why not? It's our money at risk."

Undoubtedly, in the seven years that Hebb piloted the S.S. Alex. Brown, he has had lots of good trips and some bad trips. But, as he must have found out long ago, when you're the captain, you get the credit or the blame for whatever happens on your watch.

It's a gem in a field of rocks and it has an intrinsic value of $18.70 a share. But Gordon Smith of Miller & Smith only wanted to pay $9 a share. So the board of directors of Maryland Federal Bancorp said no thanks. We'll keep our independence here at Maryland Federal Savings & Loan Association and we'll do what we can to enhance the value of our stock. The shares are now trading at a depressed $7.

Miller & Smith owns 9.8 percent of the stock of Maryland Federal, has permission from the regulators to raise that amount to 25 percent -- but only if the Maryland Federal board agrees.

Miller & Smith also owns Providence Savings & Loan of Vienna, so a buyout of Maryland Federal would represent a merger of the two institutions.

Maryland Federal, which has 90 percent of its loans in single-family mortgages within a 50-mile radius, has escaped most of the troubles of the thrift industry. It earned 81 cents a share for the 1990 fiscal year, ending Feb. 28, and expects to earn $1.15 to $1.20 for the 1991 year.

Richard North, chairman of Providence Savings, said last week that Miller & Smith has no plans to change its $9 a share offer.

Investor Irwin Jacobs tried twice but failed to take over CML Group of Acton, Mass., which owns Britches of Georgetowne. So Jacobs has sold his 930,000 shares to Shearson Lehman Brothers Inc. Shearson paid about $18 each and resold the shares on the open market.