Bush had the exam during a visit to Walter Reed Army Medical Center to see soldiers recovering from severe injuries suffered in the wars in Iraq and Afghanistan, White House spokesman Gordon Johndroe said.
Bush said he was "in good shape" as he left the hospital. "About an 80 mile-an-hour fastball," he quipped.
White House physician Richard Tubb performed the MRI, and results are possible later Monday, Johndroe said. Bush's activities have not been restricted by the pain, and Tubb said the problem is probably the result of no more than wear and tear.
While at Walter Reed, the Army's top treatment center for wounded military personnel, the president was visiting 13 patients and spending time with the family of one soldier in intensive care. He also was to award seven Purple Hearts. Bush's time with troops, as always, was being kept private.
"Every time I come here I get amazed at the quality of care, the professionalism and the courage of our troops," Bush said, "I can say with certainty that the health care that our troops get at military medical facilities is excellent."
Bush said the trip likely would be his last to Walter Reed as president.
"I often times say being the commander in chief of the military is the thing I'll miss the most," he said. "Coming here to Walter Reed reminds me why."
Earlier in the day, Bush and his wife, Laura, delivered about 150 coats for the needy.
Three days before Christmas, they brought the coats to a local distribution center for the One Warm Coat Holiday Service Project, a national drive to collect warm outerwear for the less fortunate. The delivered coats were collected at the White House last week, all donated by staff.
Bush called the project a "great example of how a single citizen and eventually a group of citizens can make a difference, a positive difference."
"Laura and I are here with the mayor and other volunteers who are just trying to make a difference in one person's life," he said. "If you want to serve your nation, you can find a lot of ways to serve."
The Bushes entered the small room at the nonprofit Pathways to Housing DC each armed with a couple of coats. Aides carried the rest, and added them to the stacks of coats on tables lining the room.
One Warm Coat, begun in 1992 as a Thanksgiving Weekend coat drive in San Francisco, has since grown to approximately 1,800 coat drives and more than 450 distribution centers in the 50 states. Pathways to Housing DC is one of the distribution agencies, and provides housing and voluntary services to homeless people with mental illnesses.