NEW YORK, May 24 (Reuters) - U.S. stocks ended up slightly on Wednesday, with the S&P 500 hitting a record high close, after minutes of the Federal Reserve's latest meeting showed policymakers view a rate hike coming soon.

The Dow Jones Industrial Average rose 74.61 points, or 0.36 percent, to 21,012.52, the S&P 500 gained 5.89 points, or 0.25 percent, to 2,404.31 and the Nasdaq Composite added 24.31 points, or 0.4 percent, to 6,163.02. (Reporting by Caroline Valetkevitch; Editing by Nick Zieminski)