Obama held talks with Hu on the sidelines of the summit and said he had been "blunt" with him on the issue of North Korea.
"My hope is that President Hu will recognise as well that this is an example of Pyongyang going over the line," he said.
International investigators concluded last month that North Korea torpedoed the warship near the tense Korean sea border on March 26.
North Korea denied the allegation and has warned any punishment would trigger war.
'A bad habit'
China, which is Pyongyang's main international ally, has so far remained non-committal on the issue, prompting Obama to say that shying away from the harsh facts about North Korea's behaviour was "a bad habit we need to break".
Obama said he wanted the UN Security Council to produce a "crystal-clear acknowledgment" of the North's alleged action, which would require the co-operation of veto-wielding member China.
Separately, Naoto Kan, Japan's new prime minister, said in Toronto that he encouraged Hu to join world leaders in condemning the North's alleged sinking of the Cheonan.
At a meeting of the Group of Eight which preceded the G20 talks, leaders of the industrialised nations condemned Pyongyang for the attack.
The leaders also criticised North Korea over its nuclear programme.
Kan said the G8 condemnation issued over the weekend would "have a major bearing" on discussions at the UN.
South Korea has already referred the ship sinking to the Security Council, which could adopt a resolution condemning the North or issue a less stringent presidential statement.
Obama, who met Lee Myung-Bak, the South Korean president, on the sidelines of the G20 summit, said it was "absolutely critical that the international community rally behind him and send a clear message to North Korea that this kind of behaviour is unacceptable".
Beijing is a close ally of Pyongyang, providing the impoverished nation with an economic lifeline, and has been reluctant to endorse a UN condemnation over the ship sinking, saying it wants to assess the evidence for itself.
Al Jazeera's Melissa Chan, reporting from Beijing, said the Chinese were trying to stall on backing any formal criticism of its ally, fearing the potential fallout of streams of North Korean refugees pouring over its border if the North Korean government falls apart.
It was also not clear how much influence Beijing really had over Pyongyang, she said.
North Korea, for its part, said on Monday that it must bolster its nuclear capability to cope with "hostile" US policy.
"The recent disturbing development on the Korean Peninsula underscores the need for [North Korea] to bolster its nuclear deterrent in a newly developed way to cope with the US persistent hostile policy toward [the North] and military threat toward it," the North's foreign ministry said, just hours after Obama's comments.
The statement was carried by the official Korean Central News Agency.