McGraw-Hill Inc.'s board of directors today unanimously rejected a sweetened and friendlier takeover from American Express Co.

In a letter to American Express chairman James D. Robinson, Harold W. McGraw Jr., chairman of the publishing company, said the same "legal and regulatory" problems exist that existed with American Express' first offer, made public Jan. 9.

Originally, American Express proposed to buy McGraw Hill for $34 a share and filed a proposal to that effect with the Securities and Exchange Commission. McGraw-Hill's board rejected that offer Jan. 15.

Monday, after a bitter legal and public relations battle with McGraw and his company, Robinson withdrew the original offer. In a letter to each of the directors of McGraw-Hill, Robinson said American Express was prepared to boost its offer to $40 a share.

But Robinson said American Express would make that offer only on "friendly" terms; that is, if the directors would either approve the merger proposal or at least agree not to fight it.

Robinson said today, in a telephone interview, that he was "surprised" at the swiftness with which McGraw-Hill's directors had rejected the new proposal, especially since he had offered to discuss in advance ways in which the editorial integrity of Business Week magazine and other McGraw-Hill publications could be assured in the event of a successful takeover.

"Friendly, at least in our view," Robinson said, "We do not intend to refile an unfriendly tender offer."

But American Express said it would keep its $40-a-share offer open until March 1, despite today's rejection. When American Express made the offer last Monday, it told the publishing company's board that shareholders should at least have the opportunity to consider the $40-a-share proposal.

McGraw-Hill had closed at $26 a share the day before the first offer was announced. It closed at $31.75 a share last Friday. Trading in McGraw-Hill's stock was suspended after the Monday offer, but resumed late today on the Pacific Stock Exchange, where it closed at $27.875.

Several major shareholders, including family member Donald C. McGraw Jr., had told chairman Harold McGraw that he should change his position and give shareholders the opportunity to consider American Express offer.

But Donald McGraw, reached in Florida, said he would not make a comment on today's rejection by the board.

"I was a little surprised," he said. "But I can't make a comment until I find out just what happened. Apparently, the board found out certain things that made it vote unanimously against the offer."

Donald McGraw was ousted as a company official several years ago and did not stand for reelection to the company's board last April. He owns 622,000 shares of the 24.5 million shares of McGraw-Hill stock outstanding.

In fighting the American Express offer, Harold McGraw cited the need to preserve the integrity both of Business Week magazine and Standard & Poor's, the financial rating service that McGraw-Hill owns.

He charged that American Express president Roger H. Morley committed a "serious breach of trust" by serving as a McGraw-Hill director at the same time American Express was considering whether to try to acquire the publishing company. McGraw also said that last June, Robinson and Morely had assured him there would be no attempt at a takeover unless McGraw agreed.