Read MoreUS unveils sweeping plan to slash power pollution
"The market has lately been focused more on the weak economic news and the bond market, but we saw a reversal of that today with the revised (ISM) numbers. We got a better number and the bonds are selling off," said Rick Meckler, president of hedge fund LibertyView Capital Management in Jersey City, New Jersey.
"But it's hard to move the market higher, considering we are fairly fully valued at this point."
The ISM said its index of national factory activity rose to 55.4 last month from 54.9 in April, with the May figure just shy of the 55.5 expected by a Reuters poll of economists. The ISM had initially said the reading came in at 53.2, but it was corrected due to an error in applying the seasonal adjustments.
Read MoreISM trade: 'Downgrading economists to pure morons'
The Dow Jones industrial average rose 26.46 points or 0.16 percent, to 16,743.63. The S&P 500 gained 1.40 points or 0.07 percent, to 1,924.97. But the Nasdaq Composite dropped 5.42 points or 0.13 percent, to 4,237.20.
The Dow ended at a second consecutive record high while the S&P 500 closed at a third consecutive record though volume was still slight, suggesting a lack of conviction behind the advance. Both the Dow and the S&P 500 also set lifetime intraday highs on Monday.
The CBOE Volatility Index gained 1.6 percent but was still near the lows not seen since March 2013. The drop in the "fear index" to such lows has many, including Federal Reserve officials, concerned that the market is complacent.
Apple shares slid 0.7 percent to $628.65 after the tech giant introduced new operating systems for its Mac computers and mobile devices at its annual Worldwide Developers Conference.
Read MoreGo figure: Investors still pump money into bonds
Google Inc also pressured tech shares, falling 1.3 percent to $564.34. A censorship watchdog said Google's services were being disrupted in China ahead of this week's 25th anniversary of the 1989 crackdown on pro-democracy demonstrators around Beijing's Tiananmen Square.
Broadcom Corp was the S&P 500's biggest percentage gainer, jumping 9.3 percent to $34.84 after the chipmaker said it was looking to sell or wind down its cellular baseband business.
Ariad Pharmaceuticals Inc shares shot up 4 percent to $6.94 in heavy volume a day after the company said its drug ponatinib showed anti-tumor activity in patients with advanced gastrointestinal stromal tumors.
Trading volume was around 4.68 billion shares on U.S. exchanges, below last month's average of 5.75 billion, according to data from BATS Global Markets.