McGraw-Hill, Inc. was ordered today to show cause why the New York State Supreme Court should not order the company to permit its shareholders to decide whether they want to accept a $40-a-share takeover bid from American Express.

Justice Hortense W. Gabel told McGraw-Hill to appear at a hearing next Thursday.

The order was issued after two McGraw-Hill shareholders, each of whom owns 500 shares of the stock, asked the court to issue an injunction to force McGraw-Hill to stop fighting the takeover bid.

McGraw-Hill said the class action suit "appears to be a routine shareholders suit. It isn't believed to be of any merit and will be defended in court."

The suit, filed by Aaron G. Edelstein and Bernard S. Edelstein, charged that shareholders have lost more than $300 million because the McGraw-Hill board of directors rejected the takeover offer.

McGraw-Hill is trading between $28 and $31 a share, far less than the $40 offer.

American Express originally offered $34 a share for the giant publishing company, but McGraw-Hill and its chairman, Harold W. McGraw Jr., fought the proposed takeover. American Express later withdrew the $34 bid and said it would pay $40 a share if the board would agree to stop fighting the bid and let the shareholders decide.

Four other shareholder suits have been filed against McGraw-Hill and several major shareholders, including family member Donald C. McGraw Jr., are trying to decide whether to wage a proxy fight to wrest control of the board from the current directors. The suit filed today requires McGraw-Hill to respond faster to the charges than do the earlier suits.