Obama's decision came after the top military commanders in Iraq and Afghanistan told the president they feared the release of the photos could endanger their troops.
Obama decided he did not feel comfortable with the release and last week instructed his legal team to challenge it in court, said the official, who spoke on condition of anonymity because the president's decision had not yet been made public.
Obama has instructed administration lawyers to make the case that the national security implications of such a release have not been fully presented to the court, the official said.
The president informed Gen. Ray Odierno, commander of U.S. troops in Iraq, of his decision during a White House meeting on Tuesday.
Gen. David Petraeus, the senior commander for both wars, had also weighed in, as had Gen. David McKiernan, the top general in Afghanistan. Defense Secretary Robert Gates fired McKiernan on Monday for unrelated reasons.
Pentagon spokesman Geoff Morrell said military "commanders are concerned about the impact the release of these photos would have for the troops in Afghanistan and Iraq," and that Gates shares their concerns.
In Afghanistan, release of the pictures this month would coincide with the spring thaw that usually heralds the year's toughest fighting. Morrell also noted the release as scheduled would come as thousands of new U.S. troops head into Afghanistan's volatile south.
Federal appeals judges have ruled the photos should be released.
Through an arrangement with the court, the Pentagon was preparing to release, by May 28, two batches of photos, one of 21 images and another 23. The government had also told the judge it was "processing for release a substantial number of other images."
The American Civil Liberties Union, which is suing the government for the release, criticized the decision.
"The decision to suppress the photos is profoundly inconsistent with the promise of transparency that President Obama has made time after time," ACLU lawyer Jameel Jaffer said.
The Obama official said the president believes that the actions depicted in the photos should not be excused and fully supports the investigations, prison sentences, discharges and other punitive measures that have resulted from them. But the president does not believe that so publicizing the actions in such a graphic way would be helpful.
Slideshow archive | ABC13 wireless | Help solve crimes