Richard Drew/Associated Press

Morgan Stanley is paying for its role in the troubled stock market debut of Facebook.

On Monday, Massachusetts’s top financial authority fined the bank $5 million for violating securities laws, the first major regulatory action tied to Facebook’s initial public stock offering.

William F. Galvin, the secretary of the commonwealth of Massachusetts, accused the bank of improperly influencing the stock offering process. The regulator’s consent order asserts that a senior Morgan Stanley banker coached Facebook on how to share information with stock analysts who cover the social media company, a potential violation of a landmark legal settlement with Wall Street. While the banker never contacted the analysts directly, his actions, Mr. Galvin said, put ordinary investors at a disadvantage because they lacked access to the same research.

“The broader message here is we are going to use any means possible to enforce the strict code in place about giving out information,” Mr. Galvin said in an interview. “We want to get the message across that if Wall Street wants to get confidence back, they can’t disadvantage Main Street.”

The consent order did not name the Morgan Stanley banker, referring to him as a “senior investment banker.” But information in the regulator’s order indicated that it was Michael Grimes, one of the nation’s most influential technology bankers.

“Morgan Stanley is committed to robust compliance with both the letter and the spirit of all applicable regulations and laws,” a Morgan Stanley spokeswoman, Mary Claire Delaney, said. Morgan Stanley, in settling the case, neither admitted nor denied guilt.

Mr. Grimes, through Ms. Delaney, declined to comment. Although the banker was referred to in the order, Mr. Grimes has not been personally accused of any wrongdoing.

The fine is a small dent in the firm’s overall profit from the Facebook public offering. Morgan Stanley received approximately $68 million in underwriting fees for the IPO, according to data provider Thomson Reuters.

Still, the costs associated with the botched I.P.O. are rising. In addition to Mr. Galvin’s fine, the firm agreed to compensate some customers who overpaid when they bought Facebook shares because of a technical glitch at the Nasdaq.

The Facebook public offering was one of the most highly anticipated debuts of the last decade. In the run-up to the offering, investor interest was robust, prompting the company to increase the size of the offering and raise the share price to $38.

But the I.P.O. quickly turned into a debacle. The first day of trading was plagued with problems. The shares quickly fell below their offering price. The stock closed on Monday at $26.75.

Noah Berger for The New York Times

Since the offering, Mr. Galvin and other regulators have opened wide-ranging investigations into Facebook and the banks that handled its debut. The continuing inquiries by the Securities and Exchange Commission and the Financial Industry Regulatory Authority are examining how the banks disseminated nonpublic information to big investors — and whether it conflicted with Facebook’s public disclosures.

Regulators are also looking into Nasdaq, the exchange where Facebook trades. They are questioning whether the exchange failed to properly test its trading systems, which faltered during the stock offering.

The Massachusetts regulator is focused on Morgan Stanley’s communications with analysts.

Shortly before the Facebook offering, analysts at several banks lowered their growth estimates for the social network. The move came after Facebook issued an amended prospectus, detailing a potential slowdown in revenue.

A Facebook executive, whose name was not given in the order but who was referred to as the treasurer, also reached out to analysts. Mr. Galvin’s order asserted that the executive, in private conversations with analysts, had provided additional information on the revenue. The order indicated that Mr. Grimes was personally involved in the decision to file the new prospectus and to have Facebook communicate with analysts.

“Morgan Stanley’s senior investment banker did everything but make the phone calls himself,” the Massachusetts regulator said in a statement, referring to Mr. Grimes. “He not only rehearsed with Facebook’s treasurer who placed the calls to the research analysts, but he also drafted the majority of the script Facebook’s treasurer utilized.”

Just 12 minutes after filing the amended prospectus with regulators on May 9, the Facebook treasurer phoned Wall Street research analysts from her hotel, according to the order. She had a 15-minute conversation with Morgan Stanley analysts, and then spoke with JPMorgan Chase and other banks.

The calls provided the analysts with additional information that did not appear in the amended prospectus, the order said. The conversations, for example, included “quantitative information regarding Facebook’s” second-quarter 2012 projections.

This behavior, Mr. Galvin said, crossed the line, violating the regulatory settlement on stock research that Morgan Stanley and other companies signed in 2003. The agreement limits the communication between bankers and research analysts and bans companies from influencing stock reports to try to bolster banking operations.

The Morgan Stanley case falls into a curious gray area.

Bankers spend months preparing companies to go public, a role that includes providing guidance on research analysts. In this instance, Mr. Grimes did not personally place the calls, which would have been a clear violation of securities laws.

In his testimony before the Massachusetts regulator’s staff, Mr. Grimes indicated that the bank had pushed for Facebook to file publicly an amended prospectus to avoid “the appearance” that the company was sharing information with a select group of clients rather than broadly with investors. Mr. Grimes, the order noted, consulted with Morgan Stanley and Facebook lawyers. Ultimately, Facebook’s chief financial officer, David A. Ebersman, e-mailed the company’s board to say that the new filing would “help us to continue to deliver accurate” information without “someone claiming we are providing any selective disclosure.”

Mr. Grimes, in testimony with the regulator, further defended his role. While the Facebook treasurer was making the calls, he noted that “I was far down the hall so I wouldn’t hear anything.”

Even so, Mr. Grimes, according to the consent order, e-mailed Mr. Ebersman to say that the Facebook treasurer “was a champ in the hotel tonight,” after the treasurer wrapped up the calls.