Each leader appeared to gain something from the talks. Mr Obama was able to set aside diplomatic niceties and talk one-on-one about the cyber dispute and other sore points.
Mr Xi was able to promote directly to Mr Obama his desire for a "new model of major country relationship," in which China would be viewed as an equal global player.
"One would hope that there's a level of confidence that emerges from this meeting, and it's something that's very personality specific," said Richard Solomon, a former assistant secretary of state.
While China worries the United States is trying to encircle it militarily with its strategic "pivot to Asia," the cyber dispute is the most pressing issue for Mr Obama.
The Washington Post reported recently that China had used cyber attacks to access data from nearly 40 Pentagon weapons programs, including the F-35 Joint Strike Fighter. China dismissed the report, saying it needed no outside help for its military development.
After more than two hours of discussions on Friday night, presidents Xi and Obama said they needed to work together to tackle cyber-security issues.
Potential help in the effort to rein in cyber theft came when the State Department announced China had agreed with the United States, Russia and other major nations that international law applies to actions that states take in cyberspace. That could help ensure infrastructure like energy grids are not targeted by cyber attacks.
The two leaders agreed to expand military-to-military ties, an area that has been hindered by mistrust and poor communication.
"We are more likely to achieve our objectives of prosperity and security of our peoples if we are working co-operatively rather than engaged in conflict," Mr Obama told reporters.
Sign up for CIO Asia eNewsletters.