Trump told reporters as he departed that it was a "great day" and a "beautiful day," but did not respond to questions about the partial government shutdown, now in its 31st day. The visit lasted less than two minutes.
Trump had been criticized earlier in the day by the Rev. Al Sharpton, who said it was "an insult to the American people" that the White House was not commemorating the holiday with an event. The president's memorial visit had not been listed on his public schedule and reporters traveling with him were not informed of Trump's destination until they arrived.
Trump tweeted earlier: "Today we celebrate Dr. Martin Luther King, Jr. for standing up for the self-evident truth Americans hold so dear, that no matter what the color of our skin or the place of our birth, we are all created equal by God."
__ Associated Press writer Brian Slodysko contributed to this report.