Obama met with the captain, Richard Phillips, and Phillips' his wife, Andrea, in the Oval Office on Saturday. The White House released a photograph of the three sitting together, but did not announce the meeting ahead of time.
Phillips was captain of the Maersk Alabama when Somali pirates attacked it. Phillips was held hostage on a lifeboat for five days and was freed when U.S. Navy snipers killed three of his captors.
He is in Washington to attend the White House Correspondents Association dinner on Saturday evening.
Obama later left the White House to play basketball.