The authorities and the rebels have blamed each other for the attacks in the government-designated "safe zone".
"The members of the Security Council express grave concern over the worsening humanitarian crisis in northeast Sri Lanka, in particular the reports of hundreds of civilian casualties in recent days," the UN Security Council said in a statement late Wednesday.
The statement said the council members "strongly condemn the LTTE [Liberation Tigers for Tamil Eelam] for its acts of terrorism over many years".
It urged the group to "lay down its arms and allow the tens of the thousands of civilians to leave".
The UN estimates that about 50,000 civilians are trapped by the conflict, in a three-sq-km strip of land, and officials allege the rebels are using civilians as human shields.
The Security Council also expressed "deep concern" over reports of continued heavy shelling by government forces in the conflict zone, leading to civilian casualties.
The Sri Lankan government has repeatedly denied the charge and insisted that it cannot halt the fighting in the north because that would enable the rebels to recover and regroup.
Foreign Secretary Palitha Kohona told the BBC that his government intended to conclude its war and eliminate the Tigers.
A halt in the offensive, he said, would allow "this war to continue for another 25 years".
Mr Kohona said he was encouraged that the non-binding statement from the Security Council also urged the rebels to allow tens of thousands of civilians to leave the conflict zone.
The rebel group was not immediately available for comment.
The BBC's Charles Haviland in Colombo says that because powerful countries like Russia and China see the Sri Lankan conflict as an internal affair and not an international threat, they have been reluctant to put the issue on the Security Council's agenda.
Our correspondent says that the government sees all such statements of concern as interference.
But with increasing reports of civilian casualties, council members Britain, France and Austria had lobbied hard for the Sri Lankan situation to be addressed.
In Washington, President Obama too urged the Sri Lankan government to stop "indiscriminate shelling", give UN humanitarian teams access to civilians trapped between the warring sides, and allow the Red Cross and other relief workers to help displaced people.
An ambulance burned outside the hospital in Mullivaikal on Wednesday
Mr Obama also called on the Tamil Tigers to lay down their arms.
"Without urgent action this humanitarian crisis could turn into a catastrophe," he said.
The appeals came on Wednesday hours after a local doctor told the BBC that the main hospital in Mullivaikal was hit for the second time.
Dr T Varatharajah said more than 50 people had died when two shells hit the zone's main hospital compound.
Sources in the UN said they agreed with that figure and that 100 had been injured.
A Sri Lankan technician working for the International Committee of the Red Cross (ICRC), a 31-year-old father, was killed in shelling along with his mother, the organisation said.
There are accounts of dozens more civilians also being killed.
Shelling of the same hospital in Mullivaikal on Monday night and Tuesday morning left 49 dead and 86 injured, the doctor told the BBC earlier.
Meanwhile, satellite images have emerged which appear to show recent heavy shelling in the "safe zone".
Images released by Human Rights Watch show crater marks and considerable population displacement between 6 and 10 May.
The organisation says it has also gathered witness testimony contradicting army assertions that they are not using heavy weaponry.
Sri Lanka has denied the allegations and accused the Tamil Tiger rebels of being behind recent attacks using heavy weapons.
The army says it is now only using small arms during its military advance and in the final stages of wiping out the Tamil Tigers.
But the rebels insist that they will not surrender.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.